[flexcoders] Can't use an undefined conditional anymore?

2007-10-25 Thread tim
Hi, I used to do conditionals based on undefined all the time in AS 2. For example I would do a data look up and then cast the results to a class called foo. Then I could do a conditional if (foo == undefined) // go and do whatever as the data ovbiously doesn't exist or has not been recieved. N

Re: [flexcoders] Can't use an undefined conditional anymore?

2007-10-25 Thread Johannes Nel
if(foo) will give you the same result. basically if the instance is there it'll work else it won't On 10/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > I used to do conditionals based on undefined all the time in AS 2. For > example I would do a data look up and then cast the re

Re: [flexcoders] Can't use an undefined conditional anymore?

2007-10-25 Thread tim
Nice - much more elegant - thanks alot > if(foo) will give you the same result. basically if the instance is there > it'll work else it won't > > On 10/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I used to do conditionals based on undefined all the time in AS 2. For >> ex

Re: [flexcoders] Can't use an undefined conditional anymore?

2007-10-25 Thread Peter Hall
Just to tie up the loose ends... if a variable has a type annotation then undefined is an illegal value. Only untyped variables, or variables typed as *, may be assigned with undefined. If they are uninitialized then they are null, 0 or false, depending on the actual type. Your code probably works

RE: [flexcoders] Can't use an undefined conditional anymore?

2007-11-08 Thread Gordon Smith
:29 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Can't use an undefined conditional anymore? Just to tie up the loose ends... if a variable has a type annotation then undefined is an illegal value. Only untyped variables, or variables typed as *, may be assigned with undefined.