Re: Calling functions in other states
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Calling functions in other states
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2007年11月15日 18:48:13 -0200
> I apologise if this is either a stupid question, or has been asked
> before, but I was wondering if there was a way that I haven't found of
> calling functions of one state from within a lua script of another? I
> have several states all started with lua_newthread() all of which run
> their own scripts.
I'm probably missing something here, but if all Lua states descend from a
single parent state (ie, have been created with lua_newthread), I see no
problem calling functions across states. In C, you can simply use lua_xmove
to send a function from one state to another.
--lhf