Hi,
I am a fairly long term user of lua and wxWidgets and I have just
started using wxLua. I am using a fairly current snapshot.
I am having a couple of issues with wxConfig at the moment. First, why
is the value pushed on to the return stack first then the read flag?
Normally if you specify a default value you don't care if a value was
actually read from the config or not. Currently reading from wxConfig
can be clumsy. For instance:
dummy,val = cfg:Read("Foo",1) --cfg is a valid wxConfig object
myRadioBox:SetSelection(val)
If the values are pushed in the opposite order I can do this, which is
much simpler:
myRadioBox:SetSelection(cfg:Read("Foo",1))
I notice that in earlier versions of wxLua, the order is the other way
round. Why was it changed?
My next problem is with a wxCheckBox. How do I explicitly convert a
number to a bool? for instance the following code won't work because
wxCheckBox.SetValue() expects a bool, not a number:
dummy,val = cfg:Read("Foo",1)
myCheckBox:SetValue(val)
Thanks,
Les
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users