Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Alpha on February 15, 2015, 11:24:47 pm

Title: wxSmith generated typecast for handler functions
Post by: Alpha on February 15, 2015, 11:24:47 pm
According to bug 19334 (http://alpha0010.github.io/cb-history/bugs/19334.html), 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.
Title: Re: wxSmith generated typecast for handler functions
Post by: Alpha on February 17, 2015, 06:10:03 pm
I will commit this coming weekend, if no comments.
Title: Re: wxSmith generated typecast for handler functions
Post by: MortenMacFly 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?
Title: Re: wxSmith generated typecast for handler functions
Post by: 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?
Title: Re: wxSmith generated typecast for handler functions
Post by: MortenMacFly 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.
Title: Re: wxSmith generated typecast for handler functions
Post by: Alpha on February 20, 2015, 05:30:23 am
I will mess around with those this weekend.  See if I can break my own code.