News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

wxSmith generated typecast for handler functions

Started by Alpha, February 15, 2015, 11:24:47 PM

Previous topic - Next topic

Alpha

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.

Alpha

I will commit this coming weekend, if no comments.

MortenMacFly

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: [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]

Alpha

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?

MortenMacFly

Quote from: Alpha 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?
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: [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]

Alpha

I will mess around with those this weekend.  See if I can break my own code.