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  Announcements and General Discussion / General Discussion / Re: Request advice on cancelable commands on: April 13, 2009, 01:14:33
Thanks for the quick reply.  I didn't see that in the best practices.. guess I should go back and read it again :)

I'll move it all to the proxy then.

Tracy
2  Announcements and General Discussion / General Discussion / Request advice on cancelable commands on: April 13, 2009, 10:32:34
I was wondering if there is a way to send a notification or something to a command that's currently running.  Here's the setup of what I'm trying to do.

I have a project proxy which does all of the manipulation of the project elements in a work directory.  The user can then save off an archive which is a long running process.  To implement the archive, I created an archive command that is run and has to use things like setTimeout to keep the UI responsive (which really just updates a progress bar) while it's running.

I now need the ability to allow the user to "Cancel" the archive functionality.  However, I can't figure out a way to let the the command know that it needs to be canceled without using any hacks like setting something in the proxy or something.

I considered making a "helper" proxy to just handle saving and loading to/from an archive (they need to be able to cancel loading also) and setting a "cancel" attribute on that guy but I thought I would ask if anyone had any better ideas or if this should've been a helper proxy all along or any other suggestions/comments.

Thanks,
Tracy
Pages: [1]