RE: [flexcoders] Flex 2.0 b2: List, itemEditEnd event

2006-05-12 Thread Stephen Gilson



If you have Beta 3, you can see an example in the doc here:

http://livedocs.macromedia.com/labs/1/flex20beta3/0886.html

Stephen 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Matt Chotin
Sent: Saturday, April 29, 2006 10:45 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex 2.0 b2: List, itemEditEnd event

If the item was null we didn't do anything to create the item. The
DataGrid doesn't know how to create a new item of your class so it may
have just filled in the itemRenderer without doing anything. This
allows you to create the object yourself, which you should probably do
in the itemEditBeginning event. You'd get the information as to where
the thing is about to be created and if it's null you'd go ahead and
create an empty object and make sure that the it gets put into your
dataProvider.

I'm not sure if it will work, but I'm assuming otherwise we'd throw
errors for the value being null.

Matt 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of tyombria
Sent: Friday, April 28, 2006 1:14 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 2.0 b2: List, itemEditEnd event

Hi, all.

i have a problem with itemEditEnd event.
How can i get data was being entered?
see the code:

someList.addEventListener( ListEvent.ITEM_EDIT_END, onItemEditEnd ); ...
...

private function onItemEditEnd( event : ListEvent ) : void {
 var itemRenderer : IListItemRenderer = event.itemRenderer;
 trace( itemRenderer.data ); // outputs null
 // (row i've edited
 // was null before)
 trace( someList.dataProvider ); // outputs, for example: 1,2,,5
 // although between rows with
 // data '2' and '5'
 // i've entered, for example, '8'
 // and i can see it in list.
}






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



 




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



 








--
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] Flex 2.0 b2: List, itemEditEnd event

2006-04-29 Thread Matt Chotin



If the item was null we didn't do anything to create the item. The
DataGrid doesn't know how to create a new item of your class so it may
have just filled in the itemRenderer without doing anything. This
allows you to create the object yourself, which you should probably do
in the itemEditBeginning event. You'd get the information as to where
the thing is about to be created and if it's null you'd go ahead and
create an empty object and make sure that the it gets put into your
dataProvider.

I'm not sure if it will work, but I'm assuming otherwise we'd throw
errors for the value being null.

Matt 

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of tyombria
Sent: Friday, April 28, 2006 1:14 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 2.0 b2: List, itemEditEnd event

Hi, all.

i have a problem with itemEditEnd event.
How can i get data was being entered?
see the code:

someList.addEventListener( ListEvent.ITEM_EDIT_END, onItemEditEnd );
...
...

private function onItemEditEnd( event : ListEvent ) : void {
 var itemRenderer : IListItemRenderer = event.itemRenderer;
 trace( itemRenderer.data ); // outputs null
 // (row i've edited
 // was null before)
 trace( someList.dataProvider ); // outputs, for example: 1,2,,5
 // although between rows with
 // data '2' and '5'
 // i've entered, for example, '8'
 // and i can see it in list.
}






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



 








--
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.