bennyxqg / lua-alchemy

Automatically exported from code.google.com/p/lua-alchemy
0 stars 0 forks source link

Remove as3->lua data conversion in C interface #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sugar does not allow this anyway.

Original issue reported on code.google.com by aglad...@gmail.com on 16 Jan 2009 at 5:17

GoogleCodeExporter commented 9 years ago
Add setGlobalLuaValue() which would do auto-conversion anyway. (Both to 
LuaAlchemy
and to Wrapper)

Original comment by aglad...@gmail.com on 17 Jan 2009 at 12:00

GoogleCodeExporter commented 9 years ago

Original comment by rstehw...@gmail.com on 24 Jan 2009 at 3:49

GoogleCodeExporter commented 9 years ago
Pushed out res/remove-auto-tolua

Don't have any intention to add a global to do conversions automatically because
those conversions break all chaining of AS3 calls such as:
as3.class.String.new("Hello There").toUpperCase().toLowerCase()

Original comment by rstehw...@gmail.com on 25 Jan 2009 at 1:34

GoogleCodeExporter commented 9 years ago
It is not a global. It is a function.

lua_wrapper.setGlobal(luaState, "FOO", "Bar"); --> AS3 Userdata
lua_wrapper.setGlobalLuaValue(luaState, "FOO", "Bar"); --> Lua string

lua_wrapper.setGlobal(luaState, "FOO", new ByteArray()); --> AS3 Userdata
lua_wrapper.setGlobalLuaValue(luaState, "FOO", new ByteArray()); -->
AS3 Userdata

This is needed to be able to set native Lua values from AS3.

Original comment by aglad...@gmail.com on 25 Jan 2009 at 1:40

GoogleCodeExporter commented 9 years ago

Original comment by rstehw...@gmail.com on 25 Jan 2009 at 6:24