Base class for event data
event.EventData class is the base class for all data objects
passed to listeners. When you trigger an event using the
notify handle class method, MATLAB® assigns values to the properties of an
object and passes that object to the listener callback function (the event
To provide additional information to event listeners, subclass
event.EventData. For more information on custom event data, see
Define Event-Specific Data.
event.EventData must set the class
ConstructOnLoad attribute to
event.EventData class is a
For information on class attributes, see Class Attributes.
notify handle class method creates an
event.EventData object when called to trigger an event. The
event.EventData constructor accepts no input arguments so subclasses
event.EventData cannot pass arguments to the superclass
Source— Event source
Event source object, specified as a handle to the object that triggered the event.
EventName— Name of event
Name of the event, specified as a character vector.
Get the event source object handle and the event name from
event.EventData object passed to this callback function
when the event is triggered.
function myCallbk(s,evtData) eventSource = evtData.Source; eventName = evtData.EventName; ... end