Andre Arpin <ar...@kingston.net> wrote:
(01/01/2011 13:34)

>> The dot variant causes SpinCtrl to panic because it is trying to directly 
>address the internal value, not
>> the text field. TextCtrl is purely a text field, which is why the difference 
>wasn't revealed.
>> 
>> -----------------------------------------------------------------------------
>Odd but it might be explained. Look at the definition of wxSpinCtrl in 
>Reference Manual. There are two versions for set.
>
>void SetValue(const wxString& text)
>void SetValue(int iValue)
>
>If you look in wxWidgets there is only one definition namely the string 
>version. I don't know why the numeric version was added in wxlua probably so 
>you do not have to do SetValue(tostring(value)) for a number. This was 
>probably a mistake.
>

Very likely. I don't care, so long as it's not 'fixed' by someone who has no 
understanding of the power and versatility of symbolic text display in a 
SpinCtrl! Judging by the last 'fix' we're in grave danger of losing one of the 
best controls wxWidgets offers.

Actually it's entirely possible that the two documented versions are entirely 
intended for the same reasons I want them. The integer is obviously intended 
for the internal value, and the text is obviously intended for display. The 
latter is truly beyond dispute, though I guess normally an integer is also 
text, internally converted to a number. The dot method evidently bypasses this 
internal convertor. Ideally, I'd like to see the Get method able to do either. 
Better yet, have GetValue fetch the raw number, and have GetText work as it 
sounds like it should, instead of causing an error as it does now. :) The point 
of a SpinCtrl was to combine a SpinButton and a SpinCtrl, yet now I find I'm 
fighting to prevent the versatility of that combination from being undermined. 
Some coder out there needs to step back from the code and look at the bigger 
picture.



------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to