Author Topic: wxSmith : how to use title passed to wxDialog-based class's ctor ?  (Read 5985 times)

Offline eranon

  • Almost regular
  • **
  • Posts: 180
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.
« Last Edit: November 02, 2012, 02:59:02 am by eanon »
[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"]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxSmith : how to use title passed to wxDialog-based class's ctor ?
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline eranon

  • Almost regular
  • **
  • Posts: 180
Re: wxSmith : how to use title passed to wxDialog-based class's ctor ?
« Reply #2 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.
« Last Edit: November 02, 2012, 07:03:57 pm by eanon »
[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"]