Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: jmccay on July 02, 2006, 01:18:27 am

Title: wxSmith
Post by: jmccay on July 02, 2006, 01:18:27 am
Under wxSmith in the CB project file, what does the <load_resource> tag do? 

   I opened a project in the June 25 (rev 2610 Unicode) nightly build of CB, and it converted the XRC file (& I chose to delete them)  I unfortunately, had the old wxTemplate xrc in the directory.  Now the project is using that file instead of my dialogs.  How do I correct this?  All the dialogs are in the file properly.

jmccay
Title: Re: wxSmith
Post by: byo on July 02, 2006, 12:30:39 pm
Under wxSmith in the CB project file, what does the <load_resource> tag do? 

It define xrc fies which are automatically loaded when initializing application (just before creating maind window). But it works only if application code is managed by wxSmith (f.ex. it was created in wxSmith wizard). All those automatically loaded files can be edited in menu wxSmith->Configure wxSmith for current project.

Quote
   I opened a project in the June 25 (rev 2610 Unicode) nightly build of CB, and it converted the XRC file (& I chose to delete them)  I unfortunately, had the old wxTemplate xrc in the directory.  Now the project is using that file instead of my dialogs.  How do I correct this?  All the dialogs are in the file properly.

jmccay

Hmm, the only ting that has changed is that content of wxsmith/wxsmith.cfg file is not included inside .cbp file. It should not change anything inside xrc files. What do you mean by saying wxTemplate xrc ?
Title: Re: wxSmith
Post by: jmccay on July 04, 2006, 09:08:24 pm
Quote
   I opened a project in the June 25 (rev 2610 Unicode) nightly build of CB, and it converted the XRC file (& I chose to delete them)  I unfortunately, had the old wxTemplate xrc in the directory.  Now the project is using that file instead of my dialogs.  How do I correct this?  All the dialogs are in the file properly.

jmccay

Hmm, the only ting that has changed is that content of wxsmith/wxsmith.cfg file is not included inside .cbp file. It should not change anything inside xrc files. What do you mean by saying wxTemplate xrc ?

   Sorry, I meant to say I left the template generated by the wxWidgets wizzard in the directory.  I upgrade from an older version of the nightly builds.  The files were generated by wxSmith, but I think my problem was that I left the old xrc file in there and it had the same class name as one of my classes.  I ended up deleting the line.  It was really wierd.  The old dialog was being loaded despite what the code had configured.  Anyways, I am now manually loading the wxs files using Load, and that works:

Code
	wxsOK = wxsOK && wxXmlResource::Get()->Load(_T("wxSmith\\mainframe.wxs"));
wxsOK = wxsOK && wxXmlResource::Get()->Load(_T("wxSmith\\editAcctdialog.wxs"));

   BTW I love wxSmith.
jmccay