ClassName(instance) is marginally faster than (instance as ClassName) in my tests.
Something's gonna blow if it isn't that type. I don't have any hard rules on which to use though. I also think there are cases where you need to use "as" and vice versa due to coercion rules, but I could be wrong about that. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Josh McDonald Sent: Wednesday, June 04, 2008 9:16 PM To: [email protected] Subject: Re: [flexcoders] Re: Retrieving instence name? Isn't ClassName(instance).foo a bad idea now we have (instance as ClassName).foo? I'd much rather have a NPE when it's actually null, and a CCE when instance isn't a ClassName. -Josh On Thu, Jun 5, 2008 at 1:55 PM, Alex Harui <[EMAIL PROTECTED]> wrote: Code hints will not help when dealing with event.target unless you know what it is. Technically you should code lit like LoaderInfo(event.target).loader And hopefully, you'll get code hints when you type the '.' before loader. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of flexawesome Sent: Wednesday, June 04, 2008 7:28 PM To: [email protected] Subject: [flexcoders] Re: Retrieving instence name? Woowow Ales, you are the BEST!!!! :)) How do you know the property of event.target.loader? I was unable to see the property by using "cdoe tip" Cheers --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Sorry, I actually hadn't looked at your code before. > > > > The target/currentTarget will be a LoaderInfo. Target.loader.name <http://Target.loader.name> is > probably what you want. > > > > ________________________________ > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of flexawesome > Sent: Wednesday, June 04, 2008 2:19 PM > To: [email protected] <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Re: Retrieving instence name? > > > > > Hey Alex, I was unable to retrieve the instance name.. > > I got trace info. => [object LoaderInfo] > > Any hits? > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% <mailto:flexcoders%25> 40yahoogroups.com <http://40yahoogroups.com> > > , "Alex Harui" <aharui@> wrote: > > > > Try event.currentTarget.toString() > > > > > > > > ________________________________ > > > > From: [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% <mailto:flexcoders%25> 40yahoogroups.com <http://40yahoogroups.com> > > > [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% <mailto:flexcoders%25> 40yahoogroups.com <http://40yahoogroups.com> > > ] On > > Behalf Of flexawesome > > Sent: Wednesday, June 04, 2008 1:25 PM > > To: [email protected] <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% <mailto:flexcoders%25> 40yahoogroups.com <http://40yahoogroups.com> > > > Subject: [flexcoders] Re: Retrieving instence name? > > > > > > > > event.currentTarget.name <http://event.currentTarget.name> seem doesn't work. :( > > > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders%40yahoogroups.com <mailto:flexcoders%2540yahoogroups.com> > <mailto:flexcoders% <mailto:flexcoders%25> > 40yahoogroups.com <http://40yahoogroups.com> > > > , "flexawesome" <flexawesome@> > > wrote: > > > > > > Hey, is that possible to retrieve the instence name for imgLoad ? > > > > > > # in this example, it calls init2 from init1 and know the > instence > > name > > > is "test" but I would like to retrieve it from event or other > ways, > > is > > > that possible? > > > > > > > > > http://www.privatepaste.com/e4RWWrMIAW <http://www.privatepaste.com/e4RWWrMIAW> > <http://www.privatepaste.com/e4RWWrMIAW <http://www.privatepaste.com/e4RWWrMIAW> > > > <http://www.privatepaste.com/e4RWWrMIAW <http://www.privatepaste.com/e4RWWrMIAW> > <http://www.privatepaste.com/e4RWWrMIAW <http://www.privatepaste.com/e4RWWrMIAW> > > > > > > > > Thank you > > > > > > -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

