[flexcoders] cairngorm Events and data payloads

2006-07-27 Thread Douglas Knudsen



can someone point me to a example of how to pass data in a cairngorm type event? I'm trying the below withpackage com.mycompany.events
{
 import com.adobe.cairngorm.control.CairngormEvent;
 
 public class LoadScorecardEvent extends CairngormEvent 
 { 
  public static var EVENT_LOAD_SCORECARD: String = 'LoadScorecardEvent';
  public var scorecardId:Number;
  /**
  * The constructor, 
  */
  public function LoadScorecardEvent( ) 
  {
   super( EVENT_LOAD_SCORECARD );
   
  }
  
 }
 
}then in a view dispatching like sovar devent : LoadScorecardEvent = new LoadScorecardEvent( );devent.scorecardId = 5;  CairngormEventDispatcher.getInstance().dispatchEvent( devent );
and in the command I havepublic function execute( eventHere : CairngormEvent ) : void  {  var del : MainDelegate = new MainDelegate( this );  del.getScorecard( eventHere.scorecardId
 ); }But this bombs out with a error about scorecardId not in eventHere.DK-- Douglas Knudsenhttp://www.cubicleman.com
this is my signature, like it?

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] cairngorm Events and data payloads

2006-07-27 Thread JesterXL





close. Do this, but extend CairngormEvent 
like you are doing:
http://www.darronschall.com/weblog/archives/000191.cfm


- Original Message - 
From: Douglas 
Knudsen 
To: flexcoders@yahoogroups.com 
Sent: Thursday, July 27, 2006 10:01 AM
Subject: [flexcoders] cairngorm Events and data payloads
can someone point me to a example of how to pass data in a 
cairngorm type event? I'm trying the below withpackage 
com.mycompany.events{ import 
com.adobe.cairngorm.control.CairngormEvent; 
 public class LoadScorecardEvent extends CairngormEvent 
 {  
 public static var EVENT_LOAD_SCORECARD: String = 
'LoadScorecardEvent';  public var 
scorecardId:Number;  
/**  * The constructor, 
  */ 
 public function LoadScorecardEvent( )  
 {   
super( EVENT_LOAD_SCORECARD );  
   
}   
} }then in a view dispatching like sovar 
devent : LoadScorecardEvent = new LoadScorecardEvent( 
);   
 devent.scorecardId = 5;  

CairngormEventDispatcher.getInstance().dispatchEvent( devent ); and in 
the command I havepublic function execute( eventHere : CairngormEvent ) 
: void  { 
 var del : MainDelegate = new MainDelegate( this 
);  del.getScorecard( 
eventHere.scorecardId );   
  }But this bombs out with a error 
about scorecardId not in eventHere.DK-- 
Douglas Knudsenhttp://www.cubicleman.com this is my 
signature, like it?  
__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___