What's the description of the error?
Are you sure the controller has been instantiated?
 
Olivier

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin
Sent: Wednesday, January 10, 2007 12:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Event calling in Cairngorm 2.1 - Newbie question.



I am trying to follow the 2.1 store as a model to understand the
cairngorm structure and I am getting a constant error in trying to
dispatch an event.  I copied the example code almost exactly, but i get
seen to get the even to fire.  I don't know if the problem is in my
FrontController or my event.   

Any help you can offer is much appreciated.

Thank, Kevin 

-------------------

I have this in my main.mxml file

  private function loadGroupList() : void
            {
  CairngormEventDispatcher.getInstance().dispatchEvent( new
CairngormEvent( GetGroupListEvent.EVENT_GET_GROUP_LIST ) );
            }



and then in my event file:

   import flash.events.Event;
import com.adobe.cairngorm.control.CairngormEvent;

public class GetGroupListEvent extends CairngormEvent
{
public static var EVENT_GET_GROUP_LIST : String = "getGroupList";

//public var position : int;




/**
* Constructor.
*/
public function GetGroupListEvent()
{
super( EVENT_GET_GROUP_LIST );
}

      


     /**
      * Override the inherited clone() method, but don't return any
state.
      */
override public function clone() : Event
{
return new GetGroupListEvent();
} 
}




and my controller:


import com.adobe.cairngorm.control.FrontController;
//import the command folder
import com.onefoot.dbocl.command.*
//import each event
import com.onefoot.dbocl.event.GetGroupListEvent;




/**
* @version $Revision: $
*/
public class DboclController extends FrontController
{
public function DboclController()
{
initialiseCommands();
}




public function initialiseCommands() : void
{
addCommand( GetGroupListEvent.EVENT_GET_GROUP_LIST, GetGroupListCommand
);  
} 
}






 

---------------------

An electronic message is not binding on its sender.

Any message referring to a binding engagement must be confirmed in
writing and duly signed.

---------------------

 


---------------------
An electronic message is not binding on its sender.
Any message referring to a binding engagement must be confirmed in writing and 
duly signed.
---------------------

Reply via email to