Determine if listeners exist for event
returns tf
= event.hasListener(src
,EventName
)true
if
listeners exist for the specified event on the object src
.
Otherwise, it returns false
. When src
is
an array, event.hasListener
returns a logical
array the same size as src
.
The class of src
must define or inherit the
specified event. If src
is a heterogeneous array,
the specified event must exist on the class of the array. event.hasListener
cannot
find listeners for events that are defined by some, but not all objects
in the heterogeneous array.
event.hasListener
respects the value of
the event.listener
object Enabled
property.
If you set the listener Enabled
property to false
, event.hasListener
returns false
for
that listener.
event.hasListener
must have NotifyAccess
for
the event in question.
event.hasListener
does not work
with the predefined property events, PreSet
, PostSet
, PreGet
, PostGet
.
event.hasListener
does not work
with the predefined dynamic property events PropertyAdded
and PropertyRemoved
.
Use event.hasListener
only with
user-defined events.