flex - Very fast firing of events causes "undefined" error using as3commons-async framework -


After the

I use a simple sync routine as3commons-async structure (which I thought was stabilized as a rock)

I have a composite command with a large number of other commands, which can also be the overall command.

Now something strange happens:

when the web slowly) everything works as expected.

Now I leave the part of the heavy burden due to the orders that run at "machine" speed.

After a few dozen, sometimes more \ projects: org.as3commons.async.operation.impl :: AbstractProgressOperation / dispatchProgressEvent ()
  undefined: "a hundred removed progress" events, \ as3commons AIR player crashes with the error message \ as3commons-async \ src \ main \ actionscript \ org \ as3commons \ \ operation async \ impl \ AbstractProgressOperation.as: 135] org.as3commons .async.command.impl :: CompositeCommand / onCommandResult on () [C: \ projects \ AS3- Commons \ AS3- Commons-as YNC \ src \ main \ actionscript \ org \ as3commons \ \ command async \ impl \ CompositeCommand.a s: 287] .async.operation.impl on flash.events::EventDispatcher/dispatchEvent on org.as3commons flash.events::EventDispatcher/dispatchEventFunction (()) :: AbstractOperation / dispatchCompleteEvent () [C: \ projects \ as3commons \ as3commons-async \ src \ main \ actionscript \ org \ as3commons \ \ operation async \ impl \ AbstractOperation.as: 152]  

the went on line Abribrek progress operation code Ashinkrik Obiang By looking at, nothing has been done in reality:

  / ** * Remittance facility is a & lt; Code & gt; OperationEvent Progress & lt; / Code & gt; accident. * @ Return if event was sent; False if not * / protected function Dispatch ProgressEvent (): Zero {Dispatches (OperationEvent.Credit ProgressEvent (this)); }  

I can also take out my code as a criminal, because all its parts are doing different things and are examined in many other aspects. Also, I can not really do anything except execution () calling on the command and leaving a whole incident.

For debugging, I added some heavy trace () calls, which inevitably cause a slight delay, and the voice, it now crashes some lines below the code, still "undefined" that Indicates a line of code that is very unsatisfactory (this was a call for invalidateDisplayList (once in a component used for many years now without having any problems ever made)

What When a large set of events is very Is it fired in less time before any other encounter problems?

What could be this strange "undefined"?

I have not worked on this library, but you can delay the firing incident by using the magical setTimeout as following: dispatchEvent zero {:

  protected function dispatchProgressEvent ( ): Zero {setTimeout (function () (OperationEvent.CreditprogressEvent (this));}, 0); }  

This will delay the execution of the event until all processes are processed.


Comments