Author Topic: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture  (Read 7757 times)

Offline Feneck91

  • Multiple posting newcomer
  • *
  • Posts: 112
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.
« Last Edit: August 31, 2008, 09:41:28 pm by Feneck91 »

Offline Alexis

  • Multiple posting newcomer
  • *
  • Posts: 62
Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
« Reply #1 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,

Offline lexis

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
« Reply #2 on: October 31, 2008, 12:01:56 pm »
I am third. And I have the same problem...

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
« Reply #3 on: November 03, 2008, 11:57:36 pm »
Hmm, looks like I should look into this problem more closely ;)

Now the quick workaround is:

  • Remove the "//(*AppInitialize"  and  "//*)" lines from the application code (any commenting won't work ;) ) - this will prevent wxSmith from future modifications of that part but will also turn off the possibility to adjust the application in the wxSmith->Configure... menu
  • Adjust the code which was previously between removed lines to make the app compile

Regards
   BYO

Offline lexis

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
« Reply #4 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!

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
« Reply #5 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

Offline lexis

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
« Reply #6 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?

Offline lexis

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: WXSmith : WxFrame/wxDocParentFrame and Document/view architecture
« Reply #7 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?