Mercurial > hg > ltpda
comparison m-toolbox/m/gui/ltpdv/callbacks/ltpdv_server_server_select.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 function ltpdv_server_server_select(varargin) | |
2 | |
3 % Handles | |
4 myh = varargin{1}; | |
5 mainfig = varargin{end}; | |
6 | |
7 % Get selected server | |
8 sh = findobj(mainfig, 'Tag', 'LTPDVserverServer'); | |
9 idx = get(sh, 'Value'); | |
10 strs = get(sh, 'String'); | |
11 srv = strs{idx}; | |
12 | |
13 % split port off | |
14 [server, port] = strtok(srv, '/'); | |
15 if ~isempty(port) | |
16 port = str2num(port(2:end)); | |
17 end | |
18 | |
19 % Set server edit box | |
20 eh = findobj(mainfig, 'Tag', 'LTPDVserverServerEdit'); | |
21 set(eh, 'String', server); | |
22 | |
23 % Set port edit box | |
24 eh = findobj(mainfig, 'Tag', 'LTPDVserverPortEdit'); | |
25 set(eh, 'String', port); | |
26 | |
27 | |
28 |