Author Topic: wxSmith and Document/view frame windows  (Read 6758 times)

Offline Alexis

  • Multiple posting newcomer
  • *
  • Posts: 62
wxSmith and Document/view frame windows
« on: April 29, 2008, 11:46:15 am »
I am trying to code a MDI application with doc/view architecture with wxSmith.

When creating a new frame handled by wxSmith, (wxSmith menu, add wxFrame option), in Advanced Options, I can specify the base frame class. It works with base classes such as wxMDIChildFrame or wxMDIParentFrame. It doesn't with wxDocMDIChildFrame or wxDocMDIParentFrame classes. Code doesn't compile.

This is due to the fact that wxSmith generates a Create function call inside the constructor of the frame. But in doc/view architecture, parameters passed to Create are different (you need a doc manager, for example) and apparently you don't event need this call to Create. wxSmith should behave slightly differently in this context.

Can i go around this issue ? If not, is it possible to add a checkbox "Doc/view" and adapt the code generated by wxSmith ?

Thanks,

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith and Document/view frame windows
« Reply #1 on: April 29, 2008, 09:57:38 pm »
There's no easy way to overcome this problem currently.
The only thing that comes into my mind is to create wxPanel instead of wxFrame and model everything inside of it. When it's ready it would be quite easy to add such panel into MDI as frame's content.

Regards
   BYO

Offline Alexis

  • Multiple posting newcomer
  • *
  • Posts: 62
wxSmith and Document/view frame windows
« Reply #2 on: April 30, 2008, 10:54:31 am »
OK.

Is it doable to get my checkbox "Doc/view" in wxWmith's frame creation dialog ?
Shall I post a feature request ?

Regards

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith and Document/view frame windows
« Reply #3 on: May 04, 2008, 10:02:30 pm »
Shall I post a feature request ?

That would be the best option for now. As you can see I currently work on C::B with big pauses.

Regards
   BYO