Mercurial > hg > ishara
view arrows/@agraph/acquire.m @ 6:0ce3c2070089
Removed duplicate code and fixed doc in timed_action.
author | samer |
---|---|
date | Mon, 14 Jan 2013 14:33:37 +0000 |
parents | 3f77126f7b5f |
children |
line wrap: on
line source
function acquire(a) ud=get(0,'UserData'); i=find(ud.figs==fig(a)); if isempty(i) ud.figs=[ud.figs, fig(a)]; ud.arrows=[ud.arrows,{a}]; set(0,'UserData',ud); else fprintf('Arrow %s [%s] cannot use figure %d, already in use by %s [%s].\n',... tostring(a),a.opts.name,fig(a),tostring(ud.arrows{i}),ud.arrows{i}.opts.name); error('Figure already in use by arrow.'); end end