Trigger deletion of handle object when one of its IMROI properties is deleted
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Properties in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!