MATLAB Object-Oriented Programming

(Joyce) #1
Use the PropLis class by creating an instance and calling its attachListener method:

plObj = PropLis;
plObj.ObservedProp

ans =

1

plObj.attachListener
plObj.ObservedProp = 2;

The ObservedProp property has changed.
The new value is: 2
Its default value is: 1

See Also
event.proplistener | handle.addlistener | handle.listener

Related Examples



  • “Listener Lifecycle” on page 11-28

  • “Implement Property Set Listener” on page 11-11


11 Events — Sending and Responding to Messages

Free download pdf