That's one instance where I use it; and also (of course) if you have to
pass "this" as an argument (e.g., to Delegate.create). In a few cases in
ActionScript 2.0 it's needed to disambiguate top-level and MovieClip
functions that have the same name. (Thankfully, they fixed this in
AS3.0.) Other than that, I think it tends to clutter things up.

But that's just my take.

―
Mike Keesey

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of slangeberg
> Sent: Tuesday, November 07, 2006 11:47 AM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] Freelancer Class
> 
> I don't know if it's a remnant.
> 
> You may be doing property initialization and need to nail down scope:
> 
> class Student {
> 
> private var name:String
> 
> function Student( name:String ) {
>    this.name = name;
> }
> }
> 
> -Scott
> 
> On 11/7/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote:
> >
> > > I know I don't have to.
> > > But I think the code is more clear that way.
> >
> > Classes will not compile if you try to access variables that are not
> > declared in the class.  So by accessing a variable, it is inherently
> > referring to "this" because it absolutely must be, thus that
particular
> > use of "this" is redundant and a remnant of the days of AS1 classes
> > (prototype) and maintaining scope within them.
> >
> > That's not to say "this" doesn't have its place, but since its place
is
> > more refined now, I find it's more important to reserve its use for
> > those times so it stands out that much more.  However, everyone has
> > their own style and if using "this" gives you warm fuzzies, then who
am
> > I or anyone to take that away from you?  :)
> > _______________________________________________
> > [email protected]
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> 
> 
> 
> --
> 
> : : ) Scott
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to