[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Lua/SWIG issues...
- From: Joey Mukherjee <joey@...>
- Date: Thu, 24 May 2007 17:44:09 -0500
Ok, I have successfully merged my application, Lua, and SWIG! I am
able to access my variables in Lua and read the modified values.
Thanks to all who helped!
I noticed one bug, however. The wrapped code is not checking the
number of parameters passed into the routines. I can send in any
number of parameters, even if the parameter takes only one.
Also, is there a way to make the error messages more specific to the
function that is failing? Right now, it says something like
"argument 2 is not a number", but I'd like it to say "argument 2 to
call GetXi is not a number".
I have one last question, which might not be Lua specific:
I have a function :
void ParseTime (double, int &year, int &day, int &hour, int &minute,
int &second, long &nano);
for which I would like to return multiple values, or return the
results in a Lua table. If I try to wrap it as is, it doesn't really
work when I call it from Lua code. What is the best way to make this
a routine like "time = ParseTime (doubleT)" and have it return either
multiple values or in a table?