view m-toolbox/m/gui/gltpda/g_KeepResultCallback.m @ 52:daf4eab1a51e database-connection-manager tip

Fix. Default password should be [] not an empty string
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:29:47 +0100
parents f0afece42f48
children
line wrap: on
line source

function g_KeepResultCallback(hObject,varargin)
   % Whenever the user clicks on the checkbox to maintain local results.
   
   global selBlocks
   
   switch get(hObject,'Value')
      case 0
         % Cycle to restore proper color
         [meth,clas] = strtok(get_param(gcbh,'Tag'),' ');
         infoObj = eval([clas,'.getInfo(''',getappdata(0,'ltpda_currFunctionName'),''')']);
         switch infoObj.mcategory
            case 'Constructor'
               for kk=1:length(selBlocks)
                  try %#ok<ALIGN>
                     set_param(selBlocks(kk),'Backgroundcolor','green')
                     set_param(selBlocks(kk),'MaskHelp','')
                  catch, end
               end
            case 'Output'
               for kk=1:length(selBlocks)
                  try %#ok<ALIGN>
                     set_param(selBlocks(kk),'Backgroundcolor','lightBlue')
                     set_param(selBlocks(kk),'MaskHelp','')
                  catch, end
               end
            otherwise
               for kk=1:length(selBlocks)
                  try %#ok<ALIGN>
                     set_param(selBlocks(kk),'Backgroundcolor','red')
                     set_param(selBlocks(kk),'MaskHelp','')
                  catch, end
               end
         end
      case 1
         for kk=1:length(selBlocks)
            try %#ok<ALIGN>
               set_param(selBlocks(kk),'Backgroundcolor','magenta');
               set_param(selBlocks(kk),'MaskHelp','probe');
            catch, end
         end
   end
end