Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Alexis on April 29, 2008, 11:46:15 am

Title: wxSmith and Document/view frame windows
Post by: Alexis 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,
Title: Re: wxSmith and Document/view frame windows
Post by: byo 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
Title: wxSmith and Document/view frame windows
Post by: Alexis 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
Title: Re: wxSmith and Document/view frame windows
Post by: byo 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