Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
if( observerMap[ notificationName ] != null ) { observerMap[ notificationName ].push( observer ); } else { observerMap[ notificationName ] = [ observer ]; }
observerMap[ 'join' ] != null
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="testHash()" > <mx:Script> <![CDATA[ [Bindable]public var myHash:Array = new Array(); public static const EVILKEY:String = "join"; public static const GOODKEY:String = "kittensAndRadishes"; public function testHash():void { myHash[ GOODKEY ] = ["Testing", "a", "good", "key"]; lstGoodKey.dataProvider = myHash[ GOODKEY ]; myHash[ GOODKEY ].push( "OK" ); myHash[ EVILKEY ] = ["Testing", "the", "evil", "key"]; lstEvilKey.dataProvider = myHash[ EVILKEY ]; myHash[ EVILKEY ].push( "OK" ); } ]]> </mx:Script> <mx:List id="lstGoodKey"/> <mx:List id="lstEvilKey"/></mx:Application>