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

fillClassMethodsList

PURPOSE ^

Get the object types

SYNOPSIS ^

function fillClassMethodsList(h)

DESCRIPTION ^

 Get the object types

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function fillClassMethodsList(h)
0002 
0003 % Get the object types
0004 id = findobj('Tag', 'workspaceObjsListQL');
0005 ostr = get(id, 'String');
0006 oidx = get(id, 'Value');
0007 
0008 objStrs = ostr(oidx);
0009 
0010 if ~isempty(objStrs)
0011   
0012   type = getClassFromString(objStrs{1});
0013   diff = 0;
0014   for j=2:length(objStrs)
0015     if ~strcmp(type, getClassFromString(objStrs{j}))
0016       diff = 1;
0017     end
0018   end
0019 
0020   mths = {};
0021   if ~diff
0022     tmps = methods(type);
0023     % Remove exceptions
0024     for j=1:length(tmps)
0025       if ~strcmp(tmps{j}, 'Contents') 
0026 %         &&...
0027 %          ~strcmp(tmps{j}, 'subsref')
0028        mths = [mths tmps(j)];
0029       end
0030     end
0031   end
0032 
0033   % Fill list
0034   id = findobj('Tag', 'classMethodList');
0035   set(id, 'Value', 1);
0036   set(id, 'String', mths);
0037 
0038 end
0039 
0040 function type = getClassFromString(str)
0041 
0042 [s,r] = strtok(str, '(');
0043 type = r(2:end-1);

Generated on Tue 22-Jan-2008 10:39:13 by m2html © 2003