Packagecom.vmware.core.events
Classpublic class ObjectEvent
InheritanceObjectEvent Inheritance flash.events.Event

Represents the addition or removal of an object from the system. Certain classes of objects such as display objects are notified through other means, so this event is mostly useful for object types that are not already taken care of by flex framework events.



Public Properties
 PropertyDefined By
  isWeakReferencingMandatory : Boolean
This property is meaningful only for an objectAdded event and indicates to the recipients of this event (e.g., platform services) whether they are required to reference the object through weak-references only.
ObjectEvent
  object : Object
[read-only] The object whose addition or removal from the system is being notified.
ObjectEvent
Public Methods
 MethodDefined By
  
ObjectEvent(type:String, object:Object = null, bubbles:Boolean = true)
Initializes an instance of this class.
ObjectEvent
  
clone():Event
[override] Creates a clone of this event.
ObjectEvent
  
newAddition(object:Object, useWeakReference:Boolean = false):ObjectEvent
[static] A convenience factory method to create an instance of this class that represents the removal of an existing object from the system.
ObjectEvent
  
newRemoval(object:Object):ObjectEvent
[static] A convenience factory method to create an instance of this class that represents the addition of a new object to the system.
ObjectEvent
Public Constants
 ConstantDefined By
  OBJECT_ADDED : String = objectAdded
[static] Event type id for notifying the addition of an object to the system.
ObjectEvent
  OBJECT_REMOVED : String = objectRemoved
[static] Event type id for notifying the removal of an object from the system.
ObjectEvent
Property Detail
isWeakReferencingMandatoryproperty
isWeakReferencingMandatory:Boolean

This property is meaningful only for an objectAdded event and indicates to the recipients of this event (e.g., platform services) whether they are required to reference the object through weak-references only.

If this flag is set to true, the object should become a candidate for garbage collection once the client removes all its references to the object; in other words, the client should never have to raise the objectRemoved event for the said object. The services that require strong-referencing of the object will not be provided for this object.

The default value of this property is false.


Implementation
    public function get isWeakReferencingMandatory():Boolean
    public function set isWeakReferencingMandatory(value:Boolean):void
objectproperty 
object:Object  [read-only]

The object whose addition or removal from the system is being notified.


Implementation
    public function get object():Object
Constructor Detail
ObjectEvent()Constructor
public function ObjectEvent(type:String, object:Object = null, bubbles:Boolean = true)

Initializes an instance of this class.

Parameters
type:String — The id for the event.
 
object:Object (default = null) — Value for the object property.
 
bubbles:Boolean (default = true)
Method Detail
clone()method
override public function clone():Event

Creates a clone of this event. All custom events should override this method.

Returns
Event — A clone of this event.
newAddition()method 
public static function newAddition(object:Object, useWeakReference:Boolean = false):ObjectEvent

A convenience factory method to create an instance of this class that represents the removal of an existing object from the system.

Parameters

object:Object
 
useWeakReference:Boolean (default = false)

Returns
ObjectEvent
newRemoval()method 
public static function newRemoval(object:Object):ObjectEvent

A convenience factory method to create an instance of this class that represents the addition of a new object to the system.

Parameters

object:Object

Returns
ObjectEvent
Constant Detail
OBJECT_ADDEDConstant
public static const OBJECT_ADDED:String = objectAdded

Event type id for notifying the addition of an object to the system.

OBJECT_REMOVEDConstant 
public static const OBJECT_REMOVED:String = objectRemoved

Event type id for notifying the removal of an object from the system.