annotate aim-mat/tools/@parameter/sethandle.m @ 4:537f939baef0 tip

various bug fixes and changed copyright message
author Stefan Bleeck <bleeck@gmail.com>
date Tue, 16 Aug 2011 14:37:17 +0100
parents 20ada0af3d7d
children
rev   line source
tomwalters@0 1 % method of class @parameter
tomwalters@0 2 %
bleeck@3 3 % (c) 2011, University of Southampton
bleeck@3 4 % Maintained by Stefan Bleeck (bleeck@gmail.com)
bleeck@3 5 % download of current version is on the soundsoftware site:
bleeck@3 6 % http://code.soundsoftware.ac.uk/projects/aimmat
bleeck@3 7 % documentation and everything is on http://www.acousticscale.org
tomwalters@0 8
tomwalters@0 9 function param=sethandle(param,text,hand,inbox,handle_nr)
tomwalters@0 10 % sets the handle of this item. handles_nr is usually 1 but can be 2 in
tomwalters@0 11 % cases when more then one object is on the screen (float with unit,
tomwalters@0 12 % filename...)
tomwalters@0 13
tomwalters@0 14 cont=param.entries;
tomwalters@0 15 nrent=length(cont);
tomwalters@0 16
tomwalters@0 17 if nargin<5
tomwalters@0 18 handle_nr=1;
tomwalters@0 19 end
tomwalters@0 20
tomwalters@0 21 if nargin<4
tomwalters@0 22 inbox='all';
tomwalters@0 23 end
tomwalters@0 24
tomwalters@0 25 nr=getentrynumberbytext(param,text,inbox);
tomwalters@0 26 if nr>0
tomwalters@0 27 param.entries{nr}.handle{handle_nr}=hand;
tomwalters@0 28 return
tomwalters@0 29 else
tomwalters@0 30 val='sethandle: error, the entry does not exist';
tomwalters@0 31 end