lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi.

loadstring (string [, chunkname]) creates a function,
I'd like to be able to call that function with arguments,
meaning it should be a defined as a (...) function. It
doesnt seem to be.

I'm using this to implement serializable callbacks.
eg.

dialog = something
dialog.OnClick = Event:new()

dialog.OnClick:Add([[
print(unpack(arg))
]])

which I then load with loadstring, and execute when
the event is fired, a JIT callback.

Can any of you think/know about a better way to implement
serializable callbacks ? Does it make sense to have loadstring 
create a (...) function ?

Thanks
--
Reyn Vlietstra