RE: [flexcoders] Dispathching and Event from Combo Box cell renderer

2005-05-24 Thread Matt Chotin










Its the ComboCellRenderer
dispatching the statusChanged event? In that case the addEventListener is on
the wrong thing because its not main dispatching the event. I think if
the ComboCellRenderer does listOwner.parentDocument.dispatchEvent({type: statusChanged})
then it will execute on main.mxml.



Matt











From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mohanraj Jayaraman
Sent: Tuesday, May 24, 2005 4:53
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dispathching
and Event from Combo Box cell renderer





Hi ,

I have a main.mxml where I have this DataGrid 

 function
initListener(){

addEventListener(statusChanged,
mx.utils.Delegate.create(this, onStatusChange));
 }

 function
onStatusChange(e){

 mx.controls.Alert.show(listener is
Listening); }


 mx:DataGrid
id=datagrid1 rowHeight=100
dataProvider={tp}
editable=true 
 mx:columns

mx:Array

mx:DataGridColumn headerText=Name
columnName=name
editable=false/

mx:DataGridColumn headerText=City
columnName=city
editable=false /

  mx:DataGridColumn
headerText=Birthday
columnName=day /

  mx:DataGridColumn
headerText=Status
columnName=status
editable=true
cellRenderer=ComboCellRenderer /

 

/mx:Array
 /mx:columns
 /mx:DataGrid


Whenever the combox box value is changed I want to
call a remote object with the datagrid's
selectedItem
object.

I am handling the 'change' event in the
ComboCellRenderer and dispatching a
'statusChanged'
event and I also have a listener attached to
main.mxml
for the 'statusChanged' event. But whenever the
combo
box value is changed the listener function
onStatusChange in main.mxml is not called.

Can you tell me what I am missing here?

Thanks
Mohan


__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com













Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
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] Dispathching and Event from Combo Box cell renderer

2005-05-24 Thread Mohanraj Jayaraman
Hi Matt,

Thanks , that worked. 
Mohanraj


--- Matt Chotin [EMAIL PROTECTED] wrote:
 It's the ComboCellRenderer dispatching the
 statusChanged event?  In that
 case the addEventListener is on the wrong thing
 because it's not main
 dispatching the event.  I think if the
 ComboCellRenderer does
 listOwner.parentDocument.dispatchEvent({type:
 'statusChanged'}) then it
 will execute on main.mxml.
 
  
 
 Matt
 
  
 
 
 
 From: flexcoders@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Mohanraj Jayaraman
 Sent: Tuesday, May 24, 2005 4:53 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Dispathching and Event from
 Combo Box cell
 renderer
 
  
 
 Hi ,
 
 I have a main.mxml where I have this DataGrid 
 
   function initListener(){
 addEventListener(statusChanged,
 mx.utils.Delegate.create(this, onStatusChange));
   }
 
   function onStatusChange(e){
 mx.controls.Alert.show(listener is
 Listening); }
 
 
 mx:DataGrid id=datagrid1 rowHeight=100
 dataProvider={tp} editable=true 
   mx:columns
 mx:Array
   mx:DataGridColumn headerText=Name
 columnName=name editable=false/
   mx:DataGridColumn headerText=City
 columnName=city editable=false /
   mx:DataGridColumn
 headerText=Birthday
 columnName=day /
   mx:DataGridColumn headerText=Status
 columnName=status editable=true
 cellRenderer=ComboCellRenderer /
 
 /mx:Array
   /mx:columns
 /mx:DataGrid
 
 
 Whenever the combox box value is changed I want to
 call a remote object with the datagrid's
 selectedItem
 object.
 
 I am handling the 'change' event in the
 ComboCellRenderer and dispatching a 'statusChanged'
 event and I also have a listener attached to
 main.mxml
 for the 'statusChanged' event. But whenever the
 combo
 box value is changed the listener function
 onStatusChange in main.mxml is not called.
 
 Can you tell me what I am missing here?
 
 Thanks
 Mohan
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around 
 http://mail.yahoo.com 
 
 
 
 
 
 Yahoo! Groups Links
 
 * To visit your group on the web, go to:
   http://groups.yahoo.com/group/flexcoders/
 
 * To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]

mailto:[EMAIL PROTECTED]
 
 
 * Your use of Yahoo! Groups is subject to the Yahoo!
 Terms of
 Service http://docs.yahoo.com/info/terms/ . 
 
 



__ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 



 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/