XRC - Yeah or Nay? Topic is solved

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
streamer
Earned a small fee
Earned a small fee
Posts: 15
Joined: Thu Feb 05, 2009 4:26 pm

XRC - Yeah or Nay?

Post by streamer » Thu Jun 11, 2009 5:04 pm

This is such a noobie question but one that I've never been able to fully gleen an answer from anywehere.

I use DialogBlocks to generate my dialogs and then Visual Studio on Windows and XCode on a Mac to code and build, and so far I don't use the XRC files.

But would that be a preferred way to go, generate the dialogs in XRC files etc. I've not been able to find (probably under my nose) any pro's/cons on using/not using XRC files!

Some learned opinions would help me.

Thanks in advance, Richard

protocol
Moderator
Moderator
Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX
Contact:

Post by protocol » Fri Jun 12, 2009 5:13 am

I've been using XRC files since I found out about them (+3 years ago). Its been a great idea ever since. Any time you can use a MVC paradigm, it probably is a good move. There are several advantages to decoupling code from UI. I'm not a teacher, so you can look it up. But yes I use XRCed to build GUIs on Mac, Linux, and Win32.

Simply, I recommend it.
/* UIKit && wxWidgets 2.8 && Cocoa && .Net */
QuRegExmm
wxPCRE & ObjPCRE - Regex It!

illnatured
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 234
Joined: Mon May 08, 2006 12:31 pm
Location: Krakow, Poland

Post by illnatured » Fri Jun 12, 2009 3:10 pm

The most important advangtage of XRCs is that you don't need to recompile your code every time you make a little change in the GUI. You actually don't need compiler at all to edit GUI contained in a XRC. You can insert a new element and preview it instantly. The major disadvantage is that XRCs may not be as flexible as hardcoding GUI elements.
VC++ 2005 / Windows XP / wxWidgets 2.8.9

streamer
Earned a small fee
Earned a small fee
Posts: 15
Joined: Thu Feb 05, 2009 4:26 pm

Post by streamer » Mon Jun 15, 2009 12:29 pm

Thanks, much appreciated. I tried it on my project and I use a wxGRid which I believe isn't fully XRC'd yet. But I can work it out from here on in.

Post Reply