Re: [Flashcoders] Type Coercion Failed: Odd behavior.

2007-06-21 Thread Muzak
ult is the value null. regards, Muzak - Original Message - From: "Daniel Thompson" <[EMAIL PROTECTED]> To: Sent: Thursday, June 21, 2007 9:05 PM Subject: RE: [Flashcoders] Type Coercion Failed: Odd behavior. > >> You should always use the new "as&qu

RE: [Flashcoders] Type Coercion Failed: Odd behavior.

2007-06-21 Thread Daniel Thompson
> You should always use the new "as" operator. I disagree. If you want the TypeError thrown, because you're going to catch it, then it can be handy. I use both methods of casting and I like the choice. (I do agree that I wish it were (LiquidObject)child instead of LiquidObject(child)... but I'm

Re: [Flashcoders] Type Coercion Failed: Odd behavior.

2007-06-21 Thread Paul Chang
ll.com/weblog/archives/000211.cfm > > regards, > Muzak > > > - Original Message - > From: "Amir T Rocker" <[EMAIL PROTECTED]> > To: > Sent: Thursday, June 21, 2007 11:39 AM > Subject: Re: [Flashcoders] Type Coercion Failed: Odd behavior. >

Re: [Flashcoders] Type Coercion Failed: Odd behavior.

2007-06-21 Thread Muzak
e object, but I guess you're actually trying to do something with the retrieved instance, in which case you have to: (parent.getChildAt(i) as LiquidObject).doSomethingLiquidObjectSpecific(); regards, Muzak - Original Message - From: "Paul Chang" <[EMAIL PROTECTED]>

Re: [Flashcoders] Type Coercion Failed: Odd behavior.

2007-06-21 Thread elibol
his article might help: > http://www.darronschall.com/weblog/archives/000211.cfm > > regards, > Muzak > > > - Original Message - > From: "Amir T Rocker" <[EMAIL PROTECTED]> > To: > Sent: Thursday, June 21, 2007 11:39 AM > Subject: Re: [Flashcode

Re: [Flashcoders] Type Coercion Failed: Odd behavior.

2007-06-21 Thread Paul Chang
hursday, June 21, 2007 11:39 AM Subject: Re: [Flashcoders] Type Coercion Failed: Odd behavior. Hi, i experienced the same behaviour using this type of cast var somVar = Caster( Castee ); sometimes it works and sometimes it doesnt ... I tried to use the 'as' operator and that sudden

Re: [Flashcoders] Type Coercion Failed: Odd behavior.

2007-06-21 Thread khair
e - > From: "Amir T Rocker" <[EMAIL PROTECTED]> > To: > Sent: Thursday, June 21, 2007 11:39 AM > Subject: Re: [Flashcoders] Type Coercion Failed: Odd behavior. > > > > Hi, > > > > i experienced the same behaviour using this type of cast > &g

Re: [Flashcoders] Type Coercion Failed: Odd behavior.

2007-06-21 Thread Muzak
ct: Re: [Flashcoders] Type Coercion Failed: Odd behavior. > Hi, > > i experienced the same behaviour using this type of cast > > var somVar = Caster( Castee ); > > sometimes it works and sometimes it doesnt ... > I tried to use the 'as' operator and that suddenly works

Re: [Flashcoders] Type Coercion Failed: Odd behavior.

2007-06-21 Thread Amir T Rocker
Hi, i experienced the same behaviour using this type of cast var somVar = Caster( Castee ); sometimes it works and sometimes it doesnt ... I tried to use the 'as' operator and that suddenly works where above coed failed. var someVar = list.getItemAt( i ) as TypeToCast; I hope maybe that wor

Re: [Flashcoders] Type Coercion Failed: Odd behavior.

2007-06-20 Thread Paul Chang
Thanks Keith. That worked. On Jun 20, 2007, at 9:29 PM, keith wrote: Maybe this will help the coerce: for (var i:int=0;iif(parent.getChildAt(i) is LiquidObject){ trace(LiquidObject (parent.getChildAt(i)).selected); } } -- Keith H -- Paul Chang wrote: Hello, I've created a custom clas

Re: [Flashcoders] Type Coercion Failed: Odd behavior.

2007-06-20 Thread keith
Maybe this will help the coerce: for (var i:int=0;iif(parent.getChildAt(i) is LiquidObject){ trace(LiquidObject(parent.getChildAt(i)).selected); } } -- Keith H -- Paul Chang wrote: Hello, I've created a custom class: LiquidObject extends Sprite I then create several instances of LiquidO