view m-toolbox/m/gui/gltpda/g_BuildParamCommand.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 paramcommand = g_BuildParamCommand(paramlist,varargin)
   % Reconstruct the command line necessary to build a given plist
   
   global params paramEnabled paramSets noParamsReq %#ok<NUSED>
   
   % Initialize of the paramcommand object:
   paramcommand = strcat('params=',string(paramlist),';');
   
   if strcmpi(get_param(gcbh,'Tag'),'arithmetic'), return; end
   
   if exist('paramEnabled','var') && ~isempty(paramEnabled)
      paramcommand = [paramcommand,' paramEnabled=',mat2str(paramEnabled),';'];
   end
   
   if ~exist('params','var') || nparams(paramlist)==0, paramcommand='params=plist(); paramEnabled=[];'; end
   
   if exist('noParamsReq','var') && noParamsReq==1
      paramcommand = [paramcommand,' noParamsReq=1;'];
   end
   
   description = get_param(gcbh,'Description');
   funcname = findstr('functionName=',description);
   if funcname
      i = funcname+14;
      while ~strcmp(description(i),';'), i=i+1; end
      funcname = description(funcname+13:i-1);
      paramcommand = [paramcommand,' functionName=',funcname,';'];
   end
   
   if exist('paramSets','var') && ~isempty(paramSets)
      paramcommand = [paramcommand,' paramSets=',string(paramSets),';'];
   end
   
end