> You can only set 'bubbles' in the constructor.

Sorry, I meant set it in your call to the Event constructor, where 'bubbles' is the second parameter, not set it with an assignment statement in your constructor. You'd call

 

    super(type, true);

 

in your constructor.

 

- Gordon

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Chad Callahan
Sent: Sunday, October 29, 2006 12:15 PM
To: [email protected]
Subject: RE: [flexcomponents] Re: Datagrid ItemRenderer

 

In my Event constructor I have:

 

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

 

When I compile, I get:

 

error 1059: Property is read-only.

 

Is there a way to set bubbles=true for a custom event?

 


From: [email protected] on behalf of Gordon Smith
Sent: Sat 10/28/2006 7:10 PM
To: [email protected]
Subject: RE: [flexcomponents] Re: Datagrid ItemRenderer

You can only set 'bubbles' in the constructor.

 

- Gordon

 


From: flexcomponents@yahoogroups.com [mailto:flexcompone[EMAIL PROTECTED]com] On Behalf Of Chad Callahan
Sent: Saturday, October 28, 2006 2:33 PM
To: flexcomponents@yahoogroups.com
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: flexcomponents@yahoogroups.com on behalf of Michael Labriola
Sent: Sat 10/28/2006 12:31 PM
To: flexcomponents@yahoogroups.com
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 flexcomponents@yahoogroups.com, "Chad Callahan" <[EMAIL PROTECTED]> 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?
>

__._,_.___


SPONSORED LINKS
Software development tool Application development software Development software
Development outsourcing software Embedded software development

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to