You had some whacky stuff going on where you registered the StartupCommand to the REMOVE_MEDIATOR notification for some reason. Since this is also the notification used to remove the mediator, it's questionable why you'd want to do this.
-=Cliff>
This is my bad. StartupCommand command should registered to the notification like STARTUP I have corrected it. but still error is popup for me.
Attached is your project working without error.
-=Cliff>
This is strange. I just downloaded the files I uploaded and make imported to the flash builder. still shows the flash error message when i click the 'remove mediator' button in the UI.
You also had TestMediator1 subclassing an unnecessary AbstractTestMediator, which I removed for simplification. If you want to return an empty array from listNotificationInterests, you don't need to create an abstract class or override the listNotificationInterests method at all; the framework superclass already does that.
-=Cliff>
Note that subclassing the TestMediator1 is necessary for my real application. I subclassing many mediators from the AbstractTestMediator. because it implemented the common abstract business logic for all mediators like TestMediator1.
Following shows the sample code AbstractTestMediator class has.
override public function initializeNotifier(key:String):void
{
super.initializeNotifier(key);
if(this.dynamicNote != null)
{
var name:String
for(var i:int=0; i<dynamicNote.length; i++)
{
notificationInterests.push(name);
}
}
}
So you can see I'm adding the notification dynamically to the 'notificationInterests' array in AbstractTestMediator class. therefore it's not empty sometime. (I have added the above code to the attachment of this post)
I have noted if I remove the AbstractTestMediator and extend the TestMediator1 from Mediator, the error won't throw.Thanks
Eranda