handle.notify - Notify listeners that event is occurring - MATLAB (original) (raw)
Main Content
Class: handle
Notify listeners that event is occurring
Syntax
notify(H,EventName) notify(H,EventName,data)
Description
notify([H](#bul30oa-1-H),[EventName](#bul30oa-1-EventName))
notifies listeners that the named event is taking place on the handle objects in H
.
notify([H](#bul30oa-1-H),[EventName](#bul30oa-1-EventName),[data](#bul30oa-1-data))
includes user-defined event data.
Input Arguments
H
— Event source
handle array
Event source, specified as a handle array. All of the objects in H
must define the named event.
EventName
— Name of event
character vector | string scalar
Name of event, specified as case-sensitive, quoted text that is defined by the class of H
.
data
— User-defined event data
subclass of event.EventData
User-defined event data, specified as an object that is a subclass of the event.EventData class. For information on defining event data, see Define Event-Specific Data.
Note
Listener callbacks should not reuse the same event data object in subsequent calls to notify
. Always create a new event data object to pass to notify
.
Extended Capabilities
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool
or accelerate code with Parallel Computing Toolbox™ ThreadPool
.
Version History
Introduced in R2008a