comparison m-toolbox/classes/@repogui/cb_tableSelect.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 % CB_TABLESELECT callback executed when a table selection is made
2 %
3 % M Hewitson
4 %
5 % $Id: cb_tableSelect.m,v 1.2 2011/04/08 08:56:25 hewitson Exp $
6 %
7 function cb_tableSelect(varargin)
8
9
10 myh = varargin{1};
11 mainfig = varargin{end};
12 fieldsList = findobj(mainfig.handle, 'Tag', 'fieldsList');
13 Nc = mainfig.Nconditions;
14
15 % Get conn
16 conn = mainfig.connection;
17
18 % Set fields in list
19 fields = repogui.getFields(mainfig, conn);
20 set(fieldsList, 'Value', 1);
21 set(fieldsList, 'String', fields);
22
23 % Set fields in condition drop downs
24 for j=1:Nc
25 cdbh = findobj(mainfig.handle, 'Tag', sprintf('c%02dField', j));
26 set(cdbh, 'Value', 1);
27 set(cdbh, 'String', fields);
28 end
29
30 % Build query
31 repogui.buildquery(mainfig);
32
33 mainfig.tableSelected = get(myh, 'Value');
34
35 end