You should be able to write
m_CurrentState["Enter"](m_pOwner);
and it'll work.
- James
Frame Buffer wrote:
> Hello,
>
> I have a lua table as follows:
>
>
------------------------------------------------------------
-------------------
>
> -- create the StateAcON state
>
>
------------------------------------------------------------
-------------------
> StateAcON = {}
>
>
> StateAcON["Enter"] = function(AC)
>
> print ("[Lua]: AC is turning on...")
>
> end
>
>
> StateAcON["Execute"] = function(AC)
>
> print ("[Lua]:
"WOOSHHHHHHHHHHhhhhhh")
>
> currentTemp =
AC:getGlobalGameData():getRoomTemperature()
>
AC:getGlobalGameData():setRoomTemperature(currentTemp -
0.3)
>
> end
>
>
> StateAcON["Exit"] = function(AC)
>
> print ("[Lua]: AC is tuning off...")
>
> end
>
> I have exposed a C++ class using luabind and I am
trying to access one
> of the methods of the above table as follows:
>
>
pStateMachine->SetCurrentState(pGlobalGameData->getLua
bindObject()["StateAcON"]);
> ...
> luabind::object m_CurrentState;
> ...
> m_CurrentState.at("Execute")(m_pOwner);
>
> I get the following error:
>
> 'at' : is not a member of 'luabind::adl::object'
>
> Has the at() method being changed? What is the
alternative and have I
> provided enough information to diagnose the problem?
>
> Thanks,
> fb
>
>
>
------------------------------------------------------------
------------
>
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
a>
>
>
>
------------------------------------------------------------
------------
>
> _______________________________________________
> luabind-user mailing list
> luabind-user lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/luabind-us
er
------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
a>
_______________________________________________
luabind-user mailing list
luabind-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luabind-us
er
|