List Info

Thread: XRC fileS help




XRC fileS help
user name
2006-08-03 21:29:50


Greetings all,

I have a large project that contains a lot of panels, dialogs, etc. The
problem is that when any two people make independent modifications to
the project, getting the changes to merge nicely (read: at all) is
virtually impossible. What I would like to do is break each 'page' into
its own project, which is not a problem. However, we are using a single
xrc file. Is there someway that I can get all the xrc files into single
file that can be used by the application and have the page reference the
unified xrc file?

It seems that if I have them all dump to the same xrc file, they will
overwrite what the previous project put there. That seems to be a
similar problem with a zip file. although the doc implies that I can put
multiple files in there. But then, how do I get my app to use the
correct file/zip archive?

Thoughts? Help? [blunt force trauma?]

thanks!
kt.

--
Rick Zemer
Exacq Technologies
rzemerexacq.com
317.845.5710

__._,_.___
.

__,_._,___
XRC fileS help
user name
2006-08-07 10:29:20

Hi,

If you specify a filename for "XRC filename" in each
dialog, DB will generate these separately, and if you're
specifying a zip file for XRC files, they will be added
to the zip file automatically.

However DB doesn't correctly generate the wxXmlResource::Get()->Load()
code to load each individual XRC file from the zip, which
should be done in the application OnInit() function.
You should be able to achieve this with e.g.:

wxString archive = _T("myapp.zip"); // or wherever this is on disk
wxString url = wxFileSystem::FileNameToURL(archive);

wxXmlResource::Get()->Load(url + wxT("#zip:mydialog.xrc"));
wxXmlResource::Get()->Load(url + wxT("#zip:anotherdialog.xrc"));

or even just:

wxXmlResource::Get()->Load(url);

since wxWidgets will load all XRC files in the archive.

I'll correct the OnInit code to do the right thing if separate
XRC files are being used.

I'm not sure if this answers your particular question, though.

Regards,

Julian

At 22:29 03/08/2006, you wrote:

>Greetings all,
>
>I have a large project that contains a lot of panels, dialogs, etc. The
>problem is that when any two people make independent modifications to
>the project, getting the changes to merge nicely (read: at all) is
>virtually impossible. What I would like to do is break each 'page' into
>its own project, which is not a problem. However, we are using a single
>xrc file. Is there someway that I can get all the xrc files into single
>file that can be used by the application and have the page reference the
>unified xrc file?
>;
>It seems that if I have them all dump to the same xrc file, they will
>overwrite what the previous project put there. That seems to be a
>similar problem with a zip file. although the doc implies that I can put
>multiple files in there. But then, how do I get my app to use the
>correct file/zip archive?
>
>Thoughts? Help? [blunt force trauma?]
>
>thanks!
>;kt.
>
>
>--
>Rick Zemer
>;Exacq Technologies
>rzemerexacq.com
>317.845.5710
>
>
>
>
>Yahoo! Groups Links
>;
>
>
>

==============================================================================
Julian Smart juliananthemion.co.uk
28/5 Gillespie Crescent, Edinburgh, http://www.anthemion.co.uk
Midlothian, U.K., EH10 4HU +44 (0)131 229 5306
Writer's Cafe: power tools for writers http://www.writerscafe.co.uk
HelpBlocks: HTML help authoring http://www.helpblocks.com
DialogBlocks: cross-platform dialogs http://www.anthemion.co.uk/dialogblocks
==============================================================================

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )