Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.utils 
XMLNotifier 
Packagemx.utils
Classpublic class XMLNotifier
InheritanceXMLNotifier Inheritance Object

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Used for watching changes to XML and XMLList objects. Those objects are not EventDispatchers, so if multiple elements want to watch for changes they need to go through this mechanism. Call watchXML(), passing in the same notification function that you would pass to XML.notification. Use unwatchXML() to remove that notification.



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
  
XMLNotifier(x:XMLNotifierSingleton)
Constructor.
XMLNotifier
  
[static] Get the singleton instance of the XMLNotifier.
XMLNotifier
 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
  
Given an XML or XMLList, remove the specified notification function.
XMLNotifier
 Inherited
Returns the primitive value of the specified object.
Object
  
watchXML(xml:Object, notifiable:IXMLNotifiable, uid:String = null):void
Given an XML or XMLList, add the notification function to watch for changes.
XMLNotifier
Constructor Detail

XMLNotifier

()Constructor
public function XMLNotifier(x:XMLNotifierSingleton)

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Constructor. XMLNotifier is a singleton class, so you do not use the new operator to create multiple instances of it. Instead, call the static method XMLNotifider.getInstance() to get the sole instance of this class.

Parameters
x:XMLNotifierSingleton
Method Detail

getInstance

()method
public static function getInstance():XMLNotifier

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Get the singleton instance of the XMLNotifier.

Returns
XMLNotifier

unwatchXML

()method 
public function unwatchXML(xml:Object, notifiable:IXMLNotifiable):void

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Given an XML or XMLList, remove the specified notification function.

Parameters

xml:Object — XML/XMLList object to un-watch.
 
notifiable:IXMLNotifiable — Function notification function.

watchXML

()method 
public function watchXML(xml:Object, notifiable:IXMLNotifiable, uid:String = null):void

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Given an XML or XMLList, add the notification function to watch for changes.

Parameters

xml:Object — XML/XMLList object to watch.
 
notifiable:IXMLNotifiable — Function that needs to be called.
 
uid:String (default = null) — UID for object