Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: FSM utility question  (Read 8583 times)
lostatoll
Jr. Member
**
Posts: 15


View Profile Email
« on: September 02, 2010, 11:49:35 »

So, I'm learning this again, after a brief hiatus. I can finally use it for work!

Anyway, I thought I had a good grasp on a lot of puremvc, but have come to what's probably a stupid question.

so i'm using a state machine to initialize, and startup my app. Can you pass a note with a body into commands triggered by the FSM???


<state name={CommonConstants.STARTING}>
      
                     <transition action={CommonConstants.STARTED}
                                 target={CommonConstants.CONFIGURING}/>
                  
                     <transition action={CommonConstants.START_FAILED}
                                 target={CommonConstants.FAILING}/>
                  </state>


so when it runs the configure command, is there any way to populate the note?? I'm kind of confused, thanks!
Logged
lostatoll
Jr. Member
**
Posts: 15


View Profile Email
« Reply #1 on: September 02, 2010, 11:51:41 »

mainly because I want to handle a flash vars proxy in the configure command, but it has no reference to the main app, because that was only carried to the startup command.

I should also mention I am using fabrication, but I don't think it changes anything.
Logged
lostatoll
Jr. Member
**
Posts: 15


View Profile Email
« Reply #2 on: September 04, 2010, 11:56:17 »

ignore me, it was a stupid mistake.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #3 on: September 07, 2010, 07:34:56 »

It was a good question, and the answer is yes, you can 'tunnel' data to a Command that will be triggered by the StateMachine by passing it in the body of the notification that triggers the State change.

-=Cliff>
Logged
lostatoll
Jr. Member
**
Posts: 15


View Profile Email
« Reply #4 on: September 09, 2010, 11:18:43 »

Haha, yeah thanks, I totally figured it out and thought it was pretty obvious, but hopefully this will help someone else searching in the future :). then I realized I didn't even need to do it that way and could access my main app and stage earlier just by creating those mediators first. Problem solved.
Logged
Pages: [1]
Print