Re: luaalchemy Re-enter issue

14 views
Skip to first unread message

Alexander Gladysh

unread,
Aug 3, 2012, 8:26:03 AM8/3/12
to lua-alc...@googlegroups.com
On Tue, Jul 31, 2012 at 11:57 PM, sillybear <jxy...@yahoo.ca> wrote:
>
> We encountered an issue related to the lua alchemy doString re-enter.
>
> The boolean varible passed in from Lua Alchemy to AS3 always be "True". This
> happens in a very weird situation.
>
> scenarios:
>
> Actionscript call lua.dostring(parent lua script) which will trigger another
> actionscript call lua.dostring (child lua script)
>
> in the child lua script, we tried to access a global object, which the
> parent script and child script both have access to it and tried to set its
> field invisible through
>
> client.textbox.visible = false.
>
> The corresponding function implemented in Actionscript is as
>
> public function set visible(value:Boolean):void {
> field.showField(value);
> }
>
> However, the value we saw that lua alchemy passed in is always "True". We
> tried with client.textbox.visible = not true, the result is the same, value
> passed in is as "True"
>
> We also tried with 0 and 1, like client.textbox.visible = 0 or 1. this time
> it worked.
>
> Nny idea what would be wrong? Looks like the lua alchemy treated the value
> as string instead of boolean which will always be true.

Please show more code. Preferably, a minimal working example.

Alexander.

yi liu

unread,
Aug 3, 2012, 10:19:07 AM8/3/12
to lua-alc...@googlegroups.com
Thanks for the reply.

We found out that if we run a broken script like local a = 1; a.id = 0 before we run our actual script will fix the issue. 

Looks like when hits the script error, the lua alchemy cleans up something that it did not do in normal case when execution succeed.

Kind Regards,


From: Alexander Gladysh <agla...@gmail.com>
To: lua-alc...@googlegroups.com
Sent: Friday, August 3, 2012 8:26:03 AM
Subject: Re: luaalchemy Re-enter issue

Alexander Gladysh

unread,
Aug 5, 2012, 2:55:06 PM8/5/12
to lua-alc...@googlegroups.com
Can you please provide a minimal working example?

Alexander.
Reply all
Reply to author
Forward
0 new messages