Trigger deletion of handle object when one of its IMROI properties is deleted
Mostrar comentarios más antiguos
I have a handle class one of whose properties is an imroi object hande (e.g., as generated by imellipse),
classdef myclass < handle
properties
prop=1;
H=imellipse;
end
methods
function delete(obj)
...
end
end
end
I would like to make it so that when the imellipse object (pointed to by obj.H) is deleted from the figure it resides in, the myclass delete() method is triggered on obj. I imagine there is some way to do it with listener objects, but I am new to the subject of listeners and could use some guidance. For one thing, I cannot see how to customize the imroi class' delete() method to issue the notify() command.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Events en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!