view arrows/@agraph/acquire.m @ 42:ae596261e75f

Various fixes and development to audio handling
author samer
date Tue, 02 Dec 2014 14:51:13 +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