Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

wxSmith

(1/1)

jmccay:
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

byo:

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

--- End quote ---

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

--- End quote ---

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 ?

jmccay:

--- Quote from: byo on July 02, 2006, 12:30:39 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

--- End quote ---

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 ?

--- End quote ---

   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"));

--- End code ---

   BTW I love wxSmith.
jmccay

Navigation

[0] Message Index

Go to full version