>>> maybe try event.currentTarget.


True, your target could have changed, and using currentTarget will ensure
that you are referencing the DataGrid.

 

>>> and how are you calling selectSlide if it is private or is that a
mistake?

 

If it’s all in the same MXML, it’s accessible as private.

 

Beau

 

 

 

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Sherif Abdou
Sent: Friday, February 22, 2008 3:57 PM
To: [email protected]
Subject: Re: [flexcoders] Where did the value go?

maybe try event.currentTarget.

and how are you calling selectSlide if it is private or is that a mistake?

----- Original Message ----
From: justSteve <[EMAIL PROTECTED]>
To: flexcoders <[email protected]>
Sent: Friday, February 22, 2008 4:05:30 PM
Subject: [flexcoders] Where did the value go?

I have a datagrid that should send it's selectItem value to a detail form.

<mx:DataGrid
selectedItem= "{selectedSlide} "
change="selectSlide (event.target. selectedItem as Slide)"
dataProvider= "{slides} " >

Placing a breakpoint on the change property and observing the
event.target. selectedItem value shows the event is carrying the
expected info. But when execution reaches the handler:

public var selectedSlide: Slide;
private function selectSlide( pSlide:Slide) :void
{
selectedSlide = pSlide ; // pSlide is now null.
dispatchEvent( new Event(SELECT, true));
}

the param is null. How do I go about figuring out where my error is? I
reason that if there's something wrong with how I've typed 'Slide' I'd
get a compile-time error.

many thankx
--steve...

 

 

   _____  

Looking for last minute shopping deals? HYPERLINK
"http://us.rd.yahoo.com/evt=51734/*http:/tools.search.yahoo.com/newsearch/ca
tegory.php?category=shopping"Find them fast with Yahoo! Search.

 

 

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.20.9/1293 - Release Date: 2/22/2008
9:21 AM


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.20.9/1293 - Release Date: 2/22/2008
9:21 AM
 
    

<<image001.jpg>>

<<image002.jpg>>

Reply via email to