[scxml] passing data to the state

2010-07-12 Thread qin ding
I am learning commons scxml.  I am experimenting writing a poker game using activemq and scxml.  So, I have my config xml defined as follows: ?xml version=1.0? scxml xmlns=http://www.w3.org/2005/07/scxml;    version=1.0    initialstate=waitingRound     datamodel     data

Re: [scxml] passing data to the state

2010-07-12 Thread Rahul Akolkar
On Mon, Jul 12, 2010 at 12:49 PM, qin ding qindi...@yahoo.com wrote: I am learning commons scxml.  I am experimenting writing a poker game using activemq and scxml. So, I have my config xml defined as follows: ?xml version=1.0? scxml xmlns=http://www.w3.org/2005/07/scxml;   

Re: [scxml] passing data to the state

2010-07-12 Thread qin ding
Thank you, Rahaul, for your quick response.  If I do the following: Player p = ... // POJO from game client   getEngine().getRootContext().set(player, p); then in the states, I should do this to get it out, right? Player p = (Player) getEngine().getRootContext().get(player); Somehow, when I

Re: [scxml] passing data to the state

2010-07-12 Thread Rahul Akolkar
On Mon, Jul 12, 2010 at 3:18 PM, qin ding qindi...@yahoo.com wrote: Thank you, Rahaul, for your quick response. If I do the following: Player p = ... // POJO from game client   getEngine().getRootContext().set(player, p); then in the states, I should do this to get it out, right? Player p

Re: [scxml] passing data to the state

2010-07-12 Thread qin ding
Rahul: The exception thrown was because I accidentally had one state method defined as private. Correct it. No more error. Thank you very much for your help. QD - Original Message From: Rahul Akolkar rahul.akol...@gmail.com To: Commons Users List user@commons.apache.org Sent: Mon,