PureMVC Architects Lounge

Announcements and General Discussion => Fabrication => Topic started by: ceaseoleo on February 05, 2009, 02:20:44



Title: respondTo
Post by: ceaseoleo on February 05, 2009, 02:20:44
I just recently upgraded to .6.  This functionality doesn't seem to work for me.  I see in the documentation it says
override public function getClassByName(path:String):Class {
        return getDefinitionByName(path) as Class;     
}

must be present with getStartupCommand, but i don't see this convention used in any of the examples available.  Also, is it ok to have notifications handled by the handleNotification function and the respondTo in the same mediator ?


Title: Re: respondTo
Post by: Darshan Sawardekar on February 05, 2009, 04:01:47
Some of the examples aren't doing multi-modular stuff but showcase some of the other aspects like undo-redo etc. So I haven't included getClassByName in it. The respondTo syntax implementation is based on reflection hence the need for getClassByName. You need getClassByName in modular stuff and AIR. If you can post some code, I would be able to help better.

The FabricationMediator and subclasses return notification interests reflected from respondTo methods in the listNotificationInterests. You could append any other notifications to it and return it in the subclasses. And in the handleNotification method call super.handleNotification.

peace,
darshan