Mercurial > hg > ltpda
comparison m-toolbox/classes/@LTPDAworkbench/setParam.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % SETPARAM sets the parameter to the value for the given block. | |
2 % | |
3 % CALL: wb.setParam(blockname, key, value) | |
4 % | |
5 % M Hewitson 13-11-08 | |
6 % | |
7 % $Id: setParam.m,v 1.3 2011/04/08 08:56:32 hewitson Exp $ | |
8 % | |
9 function setParam(wb, blockname, key, value) | |
10 | |
11 % get the block with this name | |
12 b = awtinvoke(wb.mp, 'getBlockByName', blockname); | |
13 | |
14 % Convert the plist to a java plist | |
15 pl = LTPDAworkbench.jpl2mpl(awtinvoke(b, 'getPlist')); | |
16 pl.pset(key,value); | |
17 | |
18 % Convert the plist to a java plist | |
19 jpl = LTPDAworkbench.mpl2jpl(pl); | |
20 | |
21 % set the plist | |
22 awtinvoke(b, 'setPlist', jpl); | |
23 | |
24 end |