Thanks Rob, 

       Reading the docs I found out it was the change event and past
code said to use tabDetails.selectedChild. 

so I added this 

tabDetails.addEventListener("change", mx.utils.Delegate.create(this,
onChange));

The feedbacks looks like 

_level0.mainPanel._obj0.VBBOX.tabDetails._obj0 
_level0.mainPanel._obj0.VBBOX.tabDetails._obj1
_level0.mainPanel._obj0.VBBOX.tabDetails.HelloTab0

I am guessing _obj0, _obj1 and HelloTab0 has label properties?

Thanks Dan 


--- In [email protected], "Rob Rusher" <[EMAIL PROTECTED]> wrote:
>
> Every event has two things; target and type. These are the "who" and
"what"
> of the event. Depending upon the event, there may be other
properties that
> you can access as well.
> 
> Who dispatched the event is 'event.target'.
> What type of event was dispatched is 'event.type'.
> 
> I assume this is Flex 1.5 development because you're still using the
> Delegate class in your event dispatcher?
> 
> To dump the properties of an object, you would do something like:
> "for (var i in obj)" where 'i' is the property and 'obj' is the object.
> 
> Or you could use some of the debugging tools like Inspect Window by
> Christophe Coenraets <http://coenraets.com/index.jsp> or the Echo
Console
> from the FAST framework
> <http://www.macromedia.com/devnet/flex/articles/fast_userguide.html>.
> 
> HTH
> 
> Rob Rusher
>  
> RIA Consultant
> Macromedia Certified Flex Instructor
> e:[EMAIL PROTECTED] c:303.885.7044 im:robrusher
> blog:http://www.robrusher.com
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Dan Plesse
> Sent: Tuesday, January 31, 2006 2:24 PM
> To: [email protected]
> Subject: [flexcoders] Dynamic tab event label problem
> 
> 
> My problem is I don't know how to gather the label using the event
> object however not using the event is fine too. Can you
> tabDetails.selectedItem.label as well. 
> 
> // My Dynamic tab
> var newTab = tabDetails.createChildWithStyles(chatPanel2, 'HelloTab' +
> hello, { label:'HelloTab' + hello, title:'winTitle', height:200,
> width:550, fred:42 });
> 
> //My event Listener 
> newTab.addEventListener("click", mx.utils.Delegate.create(this,
onClick));
> 
> My problem is I don't know how to gather the label. 
> 
> function onClick(event) { 
>  debugTxt.text  += "onClick: event.target " + event.target + " event "
> + event.target.label +  "\r"; 
> } 
> 
> Is there a way dump the event object or find out what the user clicked
> on? Thanks. 
> 
>  
> 
> 
> 
> 
> 
> --
> 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

<*> 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/
 


Reply via email to