News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

wxSmith : how to use title passed to wxDialog-based class's ctor ?

Started by eranon, November 02, 2012, 02:44:36 AM

Previous topic - Next topic

eranon

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.next.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.
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

MortenMacFly

Quote from: eanon on November 02, 2012, 02:44:36 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?

Quote from: eanon on November 02, 2012, 02:44:36 AM
I've seen here : http://forums.next.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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

eranon

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.
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]