Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: eranon on November 02, 2012, 02:44:36 am

Title: wxSmith : how to use title passed to wxDialog-based class's ctor ?
Post by: eranon on November 02, 2012, 02:44:36 am
I've derived a class from wxDialog. This one will be subject to have a different title for every instance. So, I would like to be able to apply the passed title parameter ; as the one originally present in wxDialog ctor and/or Create() method.

Is there a way to customize the auto-generated Create() written by wxSmith ?
Or a way to enter a variable rather than a string in the properties grid of the UI editor ?
Or a way to disable the auto-generated Create() and write our own one ?
Or a way to switch from Create() to an initialization list (better) ?

I've seen here : http://forums.codeblocks.org/index.php/topic,8969.0.html that the Create() customization was already in discussion in 2008... So, maybe it's now possible... but I don't know how.
Title: Re: wxSmith : how to use title passed to wxDialog-based class's ctor ?
Post by: MortenMacFly on November 02, 2012, 06:39:38 am
Or a way to enter a variable rather than a string in the properties grid of the UI editor ?
Or a way to disable the auto-generated Create() and write our own one ?
Or a way to switch from Create() to an initialization list (better) ?
I am not sure myself, but did you try the use of macros?

I've seen here : http://forums.codeblocks.org/index.php/topic,8969.0.html that the Create() customization was already in discussion in 2008... So, maybe it's now possible... but I don't know how.
No, but the solution presented there is still valid.
Title: Re: wxSmith : how to use title passed to wxDialog-based class's ctor ?
Post by: eranon on November 02, 2012, 06:45:41 pm
What do you mean by going through macros, Morten ? To expand what where ? Otherwise, effectively, I'll apply the trick expressed in the other thread above ::)

--
EDIT : trick applied successfully.