topleft topright

Welcome, Guest. Please login or register.
May 20, 2013, 10:17:49 AM
Home Help Search Login Register
News: ATTENTION: Spambots must die! Humans must visit http://contact.futurescale.com to request forum access.

Pages: [1]
Print
Author Topic: StateMachine - A PureMVC Haxe Utility  (Read 13450 times)
zjnue
Jr. Member
**
Posts: 17


View Profile
« on: December 13, 2008, 07:54:24 AM »

This utility provides a simple yet effective Finite State Machine implementation, which allows the definition of discrete states, and the valid transitions to other states available from any given state, and the actions which trigger the transitions.

A mechanism is provided for defining the entire state machine in XML and having a fully populated StateMachine injected into the PureMVC app.

Standard and MultiCore versions are included.

The demo has historically been located here: http://trac.puremvc.org/Utility_Haxe_StateMachine
The project has been moved here: https://github.com/PureMVC/puremvc-haxe-util-statemachine/wiki

It was ported to Haxe by Zjnue Brzavi.
« Last Edit: September 22, 2012, 02:49:59 PM by puremvc » Logged
simon_ustwo
Newbie
*
Posts: 5


View Profile Email
« Reply #1 on: June 04, 2009, 08:52:09 AM »

Hi,

I've run into a small problem, when entering a state I want to have the ability to change to a new state, but because the "currentState" hasn't been set we're left in a weird state of having no state at all.

StateMachine.hx

// Enter the next State
if( nextState.entering != null ) sendNotification( nextState.entering, nextState );
currentState = nextState;

I would like to change it to:

// Enter the next State
currentState = nextState;
if( nextState.entering != null ) sendNotification( nextState.entering, nextState );


This will fix the issue I'm seeing. Note I'm using this in neko and this could be only present in this.

thoughts?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2790



View Profile WWW
« Reply #2 on: June 04, 2009, 01:54:11 PM »

That would probably be because the StateMachine utility needs to be upgraded to match the current AS3 reference version. This is a problem that existed in 1.0.

Ping the author, Zjnue,  about this. There is a link to his contributor page on the Haxe StateMachine project page.

Also, Zjnue: The trunk of the AS3 version contains the latest code, which will be published as 1.2 shortly. If you upgrade follow the code in the trunk.

-=Cliff>
« Last Edit: June 04, 2009, 01:56:36 PM by puremvc » Logged
simon_ustwo
Newbie
*
Posts: 5


View Profile Email
« Reply #3 on: June 05, 2009, 08:24:04 AM »

Cheers, I'll let him know.
Logged
zjnue
Jr. Member
**
Posts: 17


View Profile
« Reply #4 on: June 06, 2009, 04:33:07 AM »

Hi guys,
Thanks for the ping. I can look at it a little later this weekend.
Cheers
Logged
zjnue
Jr. Member
**
Posts: 17


View Profile
« Reply #5 on: June 11, 2009, 12:30:49 AM »

Updated StateMachine trunk and tagged it as 1.2. Please see if you are happy with that Cliff.
Logged
Pages: [1]
Print
Jump to:  



Login with username, password and session length

Powered by SMF 1.1.11 | SMF © 2006-2007, Simple Machines LLC
Copyright © 2006-2008 Futurescale, Inc.