Trigger deletion of handle object when one of its IMROI properties is deleted
显示 更早的评论
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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Events 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!