het = [SpecificA,SpecificB,SpecificC];
class(het)
ans
RootSuperclass
events(het)
Events for class RootSuperclass
RootEvent
event.hasListener cannot determine if there are listeners for events that are defined
by some but not all objects in the array:
event.hasListener(het,'ClassAEvent')
Error using event.hasListener
Event 'ClassAEvent' is not defined for class 'RootSuperclass'.
Determine if individual objects in the heterogeneous array have listeners defined for their
specific events, by indexing into the array:
event.hasListener(het(1),'ClassAEvent')
For more information about determining the class of heterogeneous arrays, see
“Designing Heterogeneous Class Hierarchies” on page 10-24.
See Also
Related Examples
- “Listener Lifecycle” on page 11-28
See Also