Why are the results different for the following script when I run it
using wxLuaEditor versus running it with the stand-alone Lua.
Thanks,
Bradley
---- test.lua ----
A = {date = os.time()}
function A:new(o)
o = o or {}
setmetatable(o, A)
self.__index = self
self.__tostring = self.tostring
return o
end
function A:tostring()
return os.date("%Y/%m/%d", self.date)
end
a = A:new()
print(a) -- Why does this print "table:01AA6048"
print(tostring(a)) -- this prints "2007/05/03"
-------------------------------------------------------------------------
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