zwetan wrote:
Who cares? All that means is that there is no semantic difference
between the two.

There is a difference for AS3 ! (and this is the correct behaviour)
http://livedocs.macromedia.com/labs/1/flex/langref/statements.html#this

"To call a function defined in a dynamic class, you must use this to invoke
the function in the proper scope"

This holds true for AS2 as well. In fact, this is a perfect example of the *right* use of the keyword "this".

In this kind of situation, you need to include "this" to dereference a function that is not known to exist at compile time. Otherwise it's an ambiguous statement, because the function, not being found in the class definition, is sought in the global scope instead. That would be especially bad if a similarly-named function does happen to exist in the global namespace, because you won't get a compiler error but the wrong function would be called.

- Robert
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to