Chad,

It is the way you are approaching the problem... To make things more
reusable, you should consider passing bubbles and cancelable to your
custom event as well:

your constructor should (ideally) look a little more like this:

public function
GroupsEvent(id:Number,isEnabled:Boolean=false,type:String,
bubbles:Boolean=false, cancelable:Boolean=false){
   this.isEnabled = isEnabled;
   this.id=id;
   super(type, bubbles, cancelable);
  }

--Mike

--- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> You can only set 'bubbles' in the constructor.
> 
>  
> 
> - Gordon
> 
>  
> 
> ________________________________
> 
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of Chad Callahan
> Sent: Saturday, October 28, 2006 2:33 PM
> To: [email protected]
> Subject: RE: [flexcomponents] Re: Datagrid ItemRenderer
> 
>  
> 
> Thanks!  I successfully caught the event that my itemrenderer
> dispatched, however I need to add some data to the event.  In order to
> do this, I created a custom event.  The problem is that I can't set
> bubbles=true from within the custom event, I get a compiler error saying
> that bubbles is a read only property.  Is there a way to bypass this?
> 
>  
> 
> Chad 
> 
>  
> 
> ________________________________
> 
> From: [email protected] on behalf of Michael Labriola
> Sent: Sat 10/28/2006 12:31 PM
> To: [email protected]
> Subject: [flexcomponents] Re: Datagrid ItemRenderer
> 
> 
> Chad,
> 
> When you dispatch the event, just be sure to set bubbles = true.
> 
> Then the event will bubble up through the dataGrid to the component
> container. A couple of things on this, you will to be sure to notice
> the difference between event.target and event.currentTarget.
> 
> They will be the renderer and the dataGrid. Make sure you are looking
> at the right one for data.
> 
> --Mike
> 
> --- In [email protected]
> <mailto:flexcomponents%40yahoogroups.com> , "Chad Callahan" <chad@>
> wrote:
> >
> > 
> > I have an Icon in an ItemRenderer in my DataGrid that acts as a
> button. Rather than having this button call a function, I would like
> to have it dispatch a Click event. I can't figure out how to listen
> for events from an ItemRenderer in the Component that is the owner of
> the DataGrid. Has anyone done this?
> >
>





 
Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcomponents/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/
 

Reply via email to