I had a little time over this weekend to try to catch up on some things.
This is a follow up to that issue I was having about the reference comparison.
It was a timing issue on our part that we resolved by moving up how quickly we
store a reference.
Here's an example of what I mean. The "initComplete" event handler that is
inside the "MyClass" was being called before the "addReferenceToList". The
instance was getting to its "initComplete" called faster and was attempting to
call a method that uses its stored reference from a list before the "myMethod"
method could store the reference. We are not talking about a lot of prep
either. Interesting problem to have; no invalidation or heavy lifting before
its fully completed.
public function myMethod():void
{
var newInstance:MyClass = new MyClass();
...do some prep for the new instance...
addReferenceToList(newInstance);
addElement(newInstance);
}
Changed to:
public function myMethod():void
{
var newInstance:MyClass = new MyClass();
//swapped
addReferenceToList(newInstance);
...do some prep for the new instance...
addElement(newInstance);
}
-Mark K