[flexcoders] Re: Click Event in Item Renderer... firing a second barrel ?!

2006-10-02 Thread comfuture21
try mx.events.ItemClickEvent






--- In flexcoders@yahoogroups.com, "jamiebadman" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> Can someone help ?
> 
> I've created a custom item renderer for a tree in which I have a 
> listener on the mouse click event. Unfortunately, though, the main 
> app code also needs to act on the click event - I have the tree 
> defined as:
> 
>  click="getCompanyDetail()" dataProvider="{myData.companies}" />
> 
> The event is being picked up by the renderer and the function in 
> there is working fine - but 'getCompanyDetail' isn't firing off at 
> all.
> 
> Any ideas ?
> 
> Thanks,
> 
> Jamie.
>







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

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

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




[flexcoders] Re: Click Event in Item Renderer... firing a second barrel ?!

2006-10-02 Thread Derrick Grigg
Since both events 'click' events, the event is bubbling up from the 
renderer to the main application. In order to stop it you need to do 
an event.preventDefault(), event.stopPropagation() or 
event.stopImmediatePropagation() in the first event handler to stop 
the event bubbling.

http://livedocs.macromedia.com/flex/2/langref/flash/events/Event.html

http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/common/html/w
whelp.htm?context=LiveDocs_Parts&file=0475.html



Derrick Grigg
--
www.dgrigg.com






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

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

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





[flexcoders] Re: Click Event in Item Renderer... firing a second barrel ?!

2006-10-02 Thread flex.helleman
Sould you be listening for the change event?



--- In flexcoders@yahoogroups.com, "jamiebadman" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> Can someone help ?
> 
> I've created a custom item renderer for a tree in which I have a 
> listener on the mouse click event. Unfortunately, though, the main 
> app code also needs to act on the click event - I have the tree 
> defined as:
> 
>  click="getCompanyDetail()" dataProvider="{myData.companies}" />
> 
> The event is being picked up by the renderer and the function in 
> there is working fine - but 'getCompanyDetail' isn't firing off at 
> all.
> 
> Any ideas ?
> 
> Thanks,
> 
> Jamie.
>






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

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

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