Packagemx.utils
Classpublic class NameUtil
InheritanceNameUtil Inheritance Object

The NameUtil utility class defines static methods for creating names for Flex objects. You do not create instances of NameUtil; instead you call static methods of the class, such as the NameUtil.createName() method.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
[static] Creates a unique name for any Object instance, such as "Button12", by combining the unqualified class name with an incrementing counter.
NameUtil
  
[static] Returns a string, such as "MyApplication0.addressForm.lastName.TextField17", for a DisplayObject object that indicates its position in the hierarchy of DisplayObject objects in an application.
NameUtil
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Method Detail
createUniqueName()method
public static function createUniqueName(object:Object):String

Creates a unique name for any Object instance, such as "Button12", by combining the unqualified class name with an incrementing counter.

Parameters

object:Object — Object requiring a name.

Returns
String — String containing the unique name.
displayObjectToString()method 
public static function displayObjectToString(displayObject:DisplayObject):String

Returns a string, such as "MyApplication0.addressForm.lastName.TextField17", for a DisplayObject object that indicates its position in the hierarchy of DisplayObject objects in an application.

Parameters

displayObject:DisplayObject — A DisplayObject object whose hierarchy in the application is desired.

Returns
String — String containing the position of displayObject in the hierarchy of DisplayObject objects in an application.