events - Display class event names

Syntax

events('classname')
events(obj)
e = events(...)

Description

events('classname') displays the names of the public events for the MATLAB® class classname, including events inherited from superclasses.

events(obj) displays the names of the public events for the class of the object obj, where obj is an instance of a MATLAB class. obj can be either a scalar object or an array of objects.

e = events(...) returns the event names in a cell array of strings.

An event is public when its ListenAccess attribute is set to public and its Hidden attribute is set to false (default values for both attributes). See Event Attributes for a complete list of attributes.

See Events — Sending and Responding to Messages for information on using events and listeners.

Examples

Get the names of the public events for the handle class:

events('handle')
Events for class handle:

    ObjectBeingDestroyed

See Also

properties, methods

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS