Home > m > gui > ltpdaRepoGUI > callbacks > fillClassMethodsList.m

fillClassMethodsList

PURPOSE ^

Callback to fill the list of class methods

SYNOPSIS ^

function fillClassMethodsList(h)

DESCRIPTION ^

 Callback to fill the list of class methods
 
 M Hewitson
 
 $Id: fillClassMethodsList.html,v 1.4 2008/03/31 10:27:44 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function fillClassMethodsList(h)
0002 
0003 % Callback to fill the list of class methods
0004 %
0005 % M Hewitson
0006 %
0007 % $Id: fillClassMethodsList.html,v 1.4 2008/03/31 10:27:44 hewitson Exp $
0008 %
0009 
0010 
0011 % Get the object types
0012 id = findobj('Tag', 'workspaceObjsListQL');
0013 ostr = get(id, 'String');
0014 oidx = get(id, 'Value');
0015 
0016 objStrs = ostr(oidx);
0017 
0018 if ~isempty(objStrs)
0019   
0020   type = getClassFromString(objStrs{1});
0021   diff = 0;
0022   for j=2:length(objStrs)
0023     if ~strcmp(type, getClassFromString(objStrs{j}))
0024       diff = 1;
0025     end
0026   end
0027 
0028   mths = {};
0029   if ~diff
0030     tmps = methods(type);
0031     % Remove exceptions
0032     for j=1:length(tmps)
0033       if ~strcmp(tmps{j}, 'Contents') 
0034 %         &&...
0035 %          ~strcmp(tmps{j}, 'subsref')
0036        mths = [mths tmps(j)];
0037       end
0038     end
0039   end
0040 
0041   % Fill list
0042   id = findobj('Tag', 'classMethodList');
0043   set(id, 'Value', 1);
0044   set(id, 'String', mths);
0045 
0046 end
0047 
0048 function type = getClassFromString(str)
0049 
0050 [s,r] = strtok(str, '(');
0051 type = r(2:end-1);

Generated on Mon 31-Mar-2008 12:20:24 by m2html © 2003