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