5.3.1 Object references

Object references result from expressions involving the dot or bracket operators. They may be qualified or unqualified. The following table shows various forms of object references.

Literal

Expression

Unqualified

o.id o[expr]

Qualified

o.q::id o.q::[expr]

We use the expression form of references to describe the name lookup semantics. However, every literal name can be rewritten as an expression name through the following steps:

5.3.1.1 Unqualified object references

The unqualified expression o[expr] is a reference to a property of the value of the expression o that has a name that matches one of the names of the set of names (multiname) composed in the following way:

The single name of a multiname reference r is determined by the following steps:

The base object of this reference is the value of the expression o.

Qualified object references

o.q::[expr]

This is a reference to a property inside the value of o that matches a single name. Because the qualifier is explicit, the qualified name is straightforward to compute:

The base object of this reference is the value of the expression o.


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/specs/actionscript/3/as3_specification48.html