Hi all,

One for the detectives in y'all:


Background
----------

I have an object, that I ought to fetch via a singleton and save as a local variable or member of my classes, but sometimes forget to declare. Thus sometimes I reference a member or a variable of a class, that hasn't been defined.

The compiler doesn't complain about this certain variable, which is quite annyoing as I thus doesn't know, that it is undefined.


Proof
-----

I have very easily boiled it down to:

class Test {
        function Test()  {
                trace("prof is "+profile);
        }
}

No compiler-error. Change profile to any other (non-existing) variable and the compiler throws an error.

And of course, the trace is undefined - profile isn't a member, but why does the compiler handle this member-name in some special way? It looks like some nasty hack made by some developer, who forgot to remove it :)

I do hope, that you are all able to reproduce. It have confirmed it at multiple computers using Win XP Pro and Flash 8.


Question
--------

My question is as simple as: What is profile?

--
Morten Barklund - Information Architect - TBWA\Play
Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark
Phone: +45 7027 2227 - Fax: +45 3369 1174
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to