On 7/3/07, Marcos <[EMAIL PROTECTED]> wrote:
> 1)
> wxLua: Expected a wxArrayString or table of strings for parameter 6,
> but table index 1 is 'number'.
> This error occurs when I passed a lua table with number ({1,2,3,4})
> to combobox.
>
> 2)
> When I set wxLabel title = 1, I get same error (string expected).
> wxLua: Expected a string or wxString for parameter 2, but got 'number'.
>
> In previous versions it's ok.
>
> This is a serious problem when I work with sql databases
> returning numbers.
> How can I do this?
There had to be a change in the way wxLua handles function arguments
in order for overloaded functions to work. It had to be stricter to
determine which C++ function to call since C++ does not automatically
translate numbers to strings.
For single numbers you can use tostring(), for tables, maybe just
create a little helper function to convert the table values to
strings, either returning the original translated table or a new table
as appropriate.
Hope this helps,
John Labenski
-------------------------------------------------------------------------
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