annotate 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 |
|
rev |
line source |
samer@0
|
1 function acquire(a)
|
samer@0
|
2 ud=get(0,'UserData');
|
samer@0
|
3 i=find(ud.figs==fig(a));
|
samer@0
|
4 if isempty(i)
|
samer@0
|
5 ud.figs=[ud.figs, fig(a)];
|
samer@0
|
6 ud.arrows=[ud.arrows,{a}];
|
samer@0
|
7 set(0,'UserData',ud);
|
samer@0
|
8 else
|
samer@3
|
9 fprintf('Arrow %s [%s] cannot use figure %d, already in use by %s [%s].\n',...
|
samer@3
|
10 tostring(a),a.opts.name,fig(a),tostring(ud.arrows{i}),ud.arrows{i}.opts.name);
|
samer@0
|
11 error('Figure already in use by arrow.');
|
samer@0
|
12 end
|
samer@0
|
13 end
|