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

Show Posts

* | |

  Show Posts
Pages: [1]
1  PureMVC Manifold / Bug Report / [WILL FIX] state machine 1.1 bug? puremvc.tv content error? or me on: August 14, 2009, 09:22:15
I'm using the Utility_AS3_MultiCore_StateMachine_1_1.swc and learning to use state machine utility I've been mainly using the PureMVC TV slides...

I'm thinking there may be an error on this slide describing the StateMachine.CHANGED notification, or in the state machine itself (v1.1) or in my understanding...

PureMVC TV : http://puremvc.tv/#P003/T360

States that Notification body (from the ACTION notificatation) is passed through the body of the StateMachine.CHANGED notification. But I see a State object not my data object...

notification   org.puremvc.as3.multicore.patterns.observer.Notification (@193cc831)   
   body   org.puremvc.as3.multicore.utilities.statemachine.State (@3031f701)   
      changed   null   
      entering   null   
      exiting   null   
      name   "VideoComponent/states/configureFaulting"   
      transitions   Object (@1943e449)   
   name   "StateMachine/notes/changed"   
   type   "VideoComponent/states/configureFaulting"   


and pertinent extract from the transitionTo method of class StateMachine...

*** begin extract ***

// Notify the app generally that the state changed and what the new state is
sendNotification( CHANGED, currentState, currentState.name );


*** end extract ***

Of course I can work around this using a state specific changed announcement.


VERSIONS - Should the current version information and SWCs be updated to 1.2 ?

Download page states current version 1.1. The download zip expands to (trimmed)...

Utility_AS3_StateMachine_1_2
|-- asdoc-multicore
|-- asdoc-standard
|-- bin
|   |-- Utility_AS3_MultiCore_StateMachine_1_1.swc
|   `-- Utility_AS3_StateMachine_1_1.swc
|-- lib-multicore
|-- lib-standard
|-- license.txt
|-- src-multicore
|-- src-standard
`-- version.txt


in which version.txt reads Version: 1 Revision: 2, and so i guess the source is v1.2?


Thanks

--
Paul Evans
http://www.creative-cognition.co.uk/
http://blog.creacog.co.uk/
2  Announcements and General Discussion / Architecture / structuring the implementation of a graceful saving of changes on: April 22, 2008, 07:16:59
can't believe I've allowed myself to get so muddled with something which on the face of it seems so simple, but straight to the point....

Application: Built as AIR, allows creation, editing, opening, saving of a single document to disc i.e. single application/document window.

Use case: Handle saveable changes when user notifies QUIT, NEW or OPEN.

This requires a sequence of operations including one or two async user interactions...
1. Present a Confer Save alert, result : Save, Don't save or cancel
2. If the document has never been saved, present BrowseForSave, result: File object or cancel

On success: Re-issue the original notification
On cancel: Noop

Although a self-contained modal operation, there are view implications. In addition to the presentation of dialogues, we also need to send notifications allowing things like the native menu (MainMenuMeditor) to disable menu options until the operation is complete.

Currently I have a DocumentProxy that contains the file object, hooks to other data proxies and handles the loading/saving of data - including presenting file-browse dialogues. I pondered whether this should be Proxy or Mediator for some time, but settled on Proxy... for now.

Now how to structure the operation. Slightly worried about the potential for proliferation of objects and notifications. After trying to work out how to build Command object supported by an 'operation' proxy to give it state (clearly the wrong thing to do) I found the "Asynchronous command chaining" thread on this forum (http://forums.puremvc.org/index.php?topic=23.0) covering similar issues though relating to services rather than user-interactions.

So it looks like I probably need to construct an operation object based on the spicelib task framework. But where to put that object (and it's tasks)? Current thinking is it should probably be a Mediator - but that thinking changes by the hour. Could be an extended Command? Possibly it may be an object mostly outside PureMVC that communicates directly with it's actors though events, and only notifies pureMVC of SUCCESS or CANCEL. (SUCCESS replaced by the onward notification i.e. QUIT, NEW, OPEN)

Any thoughts, strategies, pointers welcome. Thanks.

paul
--
http://blog.creacog.co.uk


Pages: [1]