On Tue, 21 Oct 2003 21:57:25 -0400 (EDT) Richard Welty <[EMAIL PROTECTED]> wrote:
RW> after spending some time with the code, and playing with an alternative RW> or two, i'm leaning towards using things like the Factory pattern to RW> extract and fold together various bits of replicated code. In fact, there are also quite a few factory-like methods (it' not really a factory) in wxEnhancedPanel class from gui/wxDialogLayout.h. RW> does anyone have any strong thoughts about this approach, positive or RW> negative? I think that we really should use XRC resources for the dialogs. The reason the existing code doesn't do it is very simple: as usual, XRC hadn't existed when the first dialogs were written and later it was simpler to build on the existing code and helper functions instead of starting to use new stuff. My current plan is to use wxEnhancedPanel for now as it works but as soon as we find something which it can't do, switch to using XRC (and sizers). RW> wxbutton *btnAdd RW> = factory.nextButton( box, wxAbove, wxRight, RW> btnCopy, btnEdit, RW> Button_Add, _("&Add...")); RW> RW> or something very much like that. You have almost reinvented wxSizer::Add() ;-) Still, I think that the existing methods should be enough for your dialog. But it's your choice. Regards, VZ ------------------------------------------------------- This SF.net email is sponsored by OSDN developer relations Here's your chance to show off your extensive product knowledge We want to know what you know. Tell us and you have a chance to win $100 http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54 _______________________________________________ Mahogany-Developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/mahogany-developers