Hello,
I have some problems with the Cairngorm Framework. I don't understand how to use the front controller. I don't understand how it works. Do I have to create a controller of my class Fcontroller (which extends of com.adobe.cairngorm.control.FrontController) in my application to allow him to listen the events? If I do that, I have an error for all my commands in the declaration of the class. I implements each with ICommand of the Cairngorm framework and I have the following error :
Id 1144: Interface method execute in namespace com.adobe.cairngorm.commands:ICommand is implemented with an incompatible signature in class control.command:ChantierGetAllCmd.
If I don't do that, the events are create but my front controller don't associate them with the commands.
If you could help me please.
Thanks
Cairngorm and Front ControllerHi,
Add the following code to your controller
class LoginController extends com.adobe.cairngorm.control.FrontController
?{
public function LoginController()
{
?initialiseCommands();
}
?
public function initialiseCommands() : void
{
?addCommand( LoginEvent.EVENT_LOGIN, LoginCommand );
?addCommand( LogoutEvent.EVENT_LOGOUT, LogoutCommand );
}
?
?}
Refer the below link.
http://www.davidtucker.net/docs/cairngorm/com/adobe/cairngorm/control/FrontContr oller.html
Cairngorm and Front ControllerHi,
Its not to clear but have you implemented the ICommand interface when creating your FrontController? If you have that's not what the ICommand interface is for, its o be implemented when creating your command classes.
THe David Tucker site is really good has a video tutorial on working with Cairngorm, which is a great starting place.
Good luck
Stephen
No, he's using the controller right, see this link:
http://www.cairngormdocs.org/tools/CairngormDiagramExplorer.swf
This is what I prefer for learning Cairngorm, you can see the architecture and view the code behind each piece by clicking on the icons, very easy to understand and follow.
Thanks for your answers.
I find my error. I didn't understand that I have to leave the event:CairngormEvent in my execute function of my commands and I put event which extends af CairngormEvent which is not allowed by Cairngorm.
Thank you again.
No comments:
Post a Comment