Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

* | |

  Show Posts
Pages: [1]
1  PureMVC Manifold / MultiCore Version / Re: Mediator removes throw error on: March 28, 2011, 11:18:02
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



2  PureMVC Manifold / MultiCore Version / Re: Mediator removes throw error on: March 28, 2011, 12:02:08
I have attached the simple flex project for reproduce it. You will find the fxp file and the flex project folder too. I used flex SDK 4.1.

Thanks

Eranda
3  PureMVC Manifold / MultiCore Version / Mediator removes throw error on: March 24, 2011, 09:38:26
Hi

Im using the multicore 1.0.5 for my application. It throw the following error when remove the mediator.  It happens when the listNotificationInterests has a notification that not listen any other mediator in the application.  In other words, if I put the notification name to a another mediators listNotificationInterests array, the error will not throw.

ypeError: Error #1009: Cannot access a property or method of a null object reference.
    at org.puremvc.as3.multicore.core::View/removeObserver()[C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3_MultiCore\src\org\puremvc\as3\multicore\core\View.as:144]
    at org.puremvc.as3.multicore.core::View/removeMediator()[C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3_MultiCore\src\org\puremvc\as3\multicore\core\View.as:245]
    at org.puremvc.as3.multicore.patterns.facade::Facade/removeMediator()[C:\Documents and Settings\Owner.CapricornOne\My Documents\My Workspaces\PureMVC\PureMVC_AS3_MultiCore\src\org\puremvc\as3\multicore\patterns\facade\Facade.as:250]


Any solution ?'

Thanks in advance
Pages: [1]