Author Topic: wxSmith generated typecast for handler functions  (Read 4241 times)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
wxSmith generated typecast for handler functions
« on: February 15, 2015, 11:24:47 pm »
According to bug 19334, the way wxSmith is currently generating casts causes errors with MSVC.  From past reading of wxWidgets documentation, the preferred method is with their builtin macros such as: wxCommandEventHandler() .

In the attached patch, I have implemented this change.  However, I am unfamiliar with wxSmith code, so I would appreciate if someone else could comment on this.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: wxSmith generated typecast for handler functions
« Reply #1 on: February 17, 2015, 06:10:03 pm »
I will commit this coming weekend, if no comments.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxSmith generated typecast for handler functions
« Reply #2 on: February 17, 2015, 07:34:35 pm »
So far I tried several wxsnith projects without error.what's missing is a customised control... How many wxsmith projects did you try?
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 Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: wxSmith generated typecast for handler functions
« Reply #3 on: February 17, 2015, 11:07:26 pm »
I did it on a few personal/test projects, and on a sampling of dialogues in C::B.  So, not exactly a thorough test.
I rarely use advanced features of wxSmith... what do you mean by customized control?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxSmith generated typecast for handler functions
« Reply #4 on: February 18, 2015, 08:50:50 pm »
I did it on a few personal/test projects, and on a sampling of dialogues in C::B.  So, not exactly a thorough test.
I rarely use advanced features of wxSmith... what do you mean by customized control?
Well you can embed customised controls (i.e. controls not supported by wxSmith) into a wxSmith layout.
Additionally did you try it on the wxSmith Demo that hold all controls? I am not sure (however), if these controls have handlers connected though. but another test would be to setup a dummy for all handlers at least on standard controls like wxTextBox etc. to see if it works correct in all cases.
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 Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: wxSmith generated typecast for handler functions
« Reply #5 on: February 20, 2015, 05:30:23 am »
I will mess around with those this weekend.  See if I can break my own code.