Re: [flexcoders] Basic inheritance question

2007-03-01 Thread Michael Schmalle
ups.com ] On > Behalf Of Karl Johnson > Sent: Tuesday, February 27, 2007 10:27 AM > To: flexcoders@yahoogroups.com ; > flexcoders@yahoogroups.com > Subject: RE: [flexcoders] Basic inheritance question > > > > In general you always want to cast something like > this - be

Re: [flexcoders] Basic inheritance question

2007-03-01 Thread Michael Schmalle
gt; > > would not compile. > > > > - Gordon > > > > ____________ > > > > From: flexcoders@yahoogroups.com > > [mailto:flexcoders@yahoogroups.com ] On > > Behalf Of Karl Johnson > > Sent: Tuesday, February 27, 2007

RE: [flexcoders] Basic inheritance question

2007-02-28 Thread Jamal Romero
On > Behalf Of Karl Johnson > Sent: Tuesday, February 27, 2007 10:27 AM > To: flexcoders@yahoogroups.com; > flexcoders@yahoogroups.com > Subject: RE: [flexcoders] Basic inheritance question > > > > In general you always want to cast something like > this - because &

Re: [flexcoders] Basic inheritance question

2007-02-28 Thread Doug McCune
The docs are telling you that event.currentTarget is typed to DisplayObject, which is higher in the inheritance chain that UIComponent. So to use setStyle you've got to type-cast event.currentTarget to either UIComponent, or some type below UIComponent in the inheritance chain. So typecasting to Bu

RE: [flexcoders] Basic inheritance question

2007-02-28 Thread Gordon Smith
yahoogroups.com Subject: RE: [flexcoders] Basic inheritance question In general you always want to cast something like this - because event.currentTarget is of type object and NOT UIComponent or Button. But since objects are loosely typed as type Object, then you reference any property or method you

RE: [flexcoders] Basic inheritance question

2007-02-27 Thread Karl Johnson
@yahoogroups.com on behalf of jairokan Sent: Tue 2/27/2007 11:53 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Basic inheritance question Hi, I'm reading the Developer's Guide and in the section using Events, they say on a paragraph that : "If you try to call anothe

[flexcoders] Basic inheritance question

2007-02-27 Thread jairokan
Hi, I'm reading the Developer's Guide and in the section using Events, they say on a paragraph that : "If you try to call another method on the currentTarget (for example, the setStyle() method), Flex returns an error. The setStyle() method is defined on UIComponent, a subclass of DisplayObject. T