Re: [flexcoders] Re: Parsley MVC :: some thoughts

2008-12-10 Thread Paul Andrews
- Original Message - From: Ralf Bokelberg [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, December 10, 2008 7:50 AM Subject: Re: [flexcoders] Re: Parsley MVC :: some thoughts Haha Amy, that's a good one. Maybe it should :) But seriously, dispatchEvent is nothing

Re: [flexcoders] Re: Parsley MVC :: some thoughts

2008-12-10 Thread Jules Suggate
Funny, I have a very similar example at my end that I wrote just now to prove to myself what was happening. I should have checked my email first ;-) On Wed, Dec 10, 2008 at 16:22, Paul Andrews [EMAIL PROTECTED] wrote: Here is a trivial example using dispatchEvent to show the synchronous

Re: [flexcoders] Re: Parsley MVC :: some thoughts

2008-12-10 Thread Jules Suggate
Sorry, I mean With /synchronous event dispatch/, triggering an event 100 times will mean the listeners get invoked 100 times, even if the last invokation completely overwrites the work of the previous 99. On Wed, Dec 10, 2008 at 23:31, Jules Suggate [EMAIL PROTECTED] wrote: For several years

Re: [flexcoders] Re: Parsley MVC :: some thoughts

2008-12-10 Thread Jules Suggate
For several years before using flash I used a proprietary GUI OO tool that had a similar (though less sophisticated) event mechanism. In that system event dispatch did not actually take place until the code block had completed - only then would handlers be invoked. This was particularly

[flexcoders] Re: Parsley MVC :: some thoughts

2008-12-10 Thread Amy
--- In flexcoders@yahoogroups.com, Ralf Bokelberg [EMAIL PROTECTED] wrote: Haha Amy, that's a good one. Maybe it should :) But seriously, dispatchEvent is nothing more than a function call, which calls all the event handler methods. Of cause you can think of pathologic examples like Paul

[flexcoders] Re: Parsley MVC :: some thoughts

2008-12-10 Thread Amy
--- In flexcoders@yahoogroups.com, Jules Suggate [EMAIL PROTECTED] wrote: For several years before using flash I used a proprietary GUI OO tool that had a similar (though less sophisticated) event mechanism. In that system event dispatch did not actually take place until the code block

Re: [flexcoders] Re: Parsley MVC :: some thoughts

2008-12-10 Thread Steve Mathews
The only way for a listener to not get called synchronously is if it is specifically setup to do that. For example in Flex you can call a method using callLater which will call it on the next frame. If you are not using Flex you can do the same thing by creating a timer with a duration of 1 and

[flexcoders] Re: Parsley MVC :: some thoughts

2008-12-09 Thread Amy
--- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: Jules, I confess I actually misread your original post - I had anticipated that when an event is despatch it wouldn't be actioned until the current code section had been completed then the player would act upon

Re: [flexcoders] Re: Parsley MVC :: some thoughts

2008-12-09 Thread Ralf Bokelberg
Hi Amy Afaik this is not possible in Flashplayer. A block of code is always running through without any interuption. Colin Moock has a good chapter of how all this works in his nice AS3 book. Cheers Ralf. On Tue, Dec 9, 2008 at 3:44 PM, Amy [EMAIL PROTECTED] wrote: I actually had this very

Re: [flexcoders] Re: Parsley MVC :: some thoughts

2008-12-09 Thread Paul Andrews
- Original Message - From: Ralf Bokelberg [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, December 09, 2008 3:00 PM Subject: Re: [flexcoders] Re: Parsley MVC :: some thoughts Hi Amy Afaik this is not possible in Flashplayer. A block of code is always running through

[flexcoders] Re: Parsley MVC :: some thoughts

2008-12-09 Thread Amy
--- In flexcoders@yahoogroups.com, Ralf Bokelberg [EMAIL PROTECTED] wrote: Hi Amy Afaik this is not possible in Flashplayer. A block of code is always running through without any interuption. Colin Moock has a good chapter of how all this works in his nice AS3 book. Apparently the code in

[flexcoders] Re: Parsley MVC :: some thoughts

2008-12-09 Thread Amy
--- In flexcoders@yahoogroups.com, Paul Andrews [EMAIL PROTECTED] wrote: - Original Message - From: Ralf Bokelberg [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, December 09, 2008 3:00 PM Subject: Re: [flexcoders] Re: Parsley MVC :: some thoughts Hi Amy

Re: [flexcoders] Re: Parsley MVC :: some thoughts

2008-12-09 Thread Paul Andrews
Here is a trivial example using dispatchEvent to show the synchronous invocation of listeners that could (if badly written) interfere with innocuous code. Normally when the click to count button is pressed, the count goes from 1 to 10. If the button to enable despatching the event is pressed,

Re: [flexcoders] Re: Parsley MVC :: some thoughts

2008-12-09 Thread Ralf Bokelberg
Haha Amy, that's a good one. Maybe it should :) But seriously, dispatchEvent is nothing more than a function call, which calls all the event handler methods. Of cause you can think of pathologic examples like Paul likes to do :) But this is really the same with function calls. It is completely

[flexcoders] Re: Parsley MVC :: some thoughts

2008-12-08 Thread aphexyuri
there is on more reason..pureMVC --- In flexcoders@yahoogroups.com, Jules Suggate [EMAIL PROTECTED] wrote: boom head explodes heh! I have been happily thinking the whole time that events really *are* asynchronous, but that's obviously not true. Reality check... Thanks guys. I