Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: Feneck91 on August 31, 2008, 09:39:44 pm

Title: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
Post by: Feneck91 on August 31, 2008, 09:39:44 pm
Hi !

I'm trying to use WxSmith to make frame, but the main frame is not a wxFrame object but wxDocParentFrame.
The code that is generate is :
Code
    //(*AppInitialize
    bool wxsOK = true;
    wxInitAllImageHandlers();
    wxXmlResource::Get()->InitAllHandlers();
    wxsOK = wxsOK && wxXmlResource::Get()->Load(_T("TTGestMainFrame.xrc"));
    if ( wxsOK )
    {
    TTGestMainFrame* Frame = new TTGestMainFrame(0);
    Frame->Show();
    SetTopWindow(Frame);
    }
    //*)
But this code is not compatible with wxDocParentFrame, it should be :
Code
wxDocParentFramepFrame = new wxDocParentFrame(&m_DocManager, NULL);

Any idea to make wxSmith work with this kind of window ?
Strange, I see few peaple that work with document/view architecture.
Title: Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
Post by: Alexis on August 31, 2008, 11:00:47 pm
Quote
Strange, I see few peaple that work with document/view architecture.
I do ! At least, we are two! :D

I wrote a post for the same thing some time ago. Here is the thread :
http://forums.codeblocks.org/index.php/topic,8320.0.html

Regards,
Title: Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
Post by: lexis on October 31, 2008, 12:01:56 pm
I am third. And I have the same problem...
Title: Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
Post by: byo on November 03, 2008, 11:57:36 pm
Hmm, looks like I should look into this problem more closely ;)

Now the quick workaround is:


Regards
   BYO
Title: Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
Post by: lexis on November 04, 2008, 04:22:35 pm
Yes, I had done so, but lost a control of wxSmith over my project resources... (if I right understand) :-(
It will be great to adjust wxSmith to work with doc/view!
Title: Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
Post by: byo on November 04, 2008, 06:38:13 pm
Yes, I had done so, but lost a control of wxSmith over my project resources... (if I right understand) :-(
It will be great to adjust wxSmith to work with doc/view!

Not exactly - you only loose control on the application startup settings, nothing else.

BYO
Title: Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
Post by: lexis on November 07, 2008, 03:23:50 pm
I have lost control over frame class completely since I have created another one. But I need to make relation between old .wxs file and new frame. I can't found where is link to frame implementation filename (not class name).
Is there some way to resolve this issue? May be not common tools but with direct intervention to wxSmith xml with text editor?
Title: Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
Post by: lexis on November 07, 2008, 03:49:06 pm
I've found the link in project file..
Why there is no way to adjust a primary wxSmith resource completely in CB?