Mercurial > hg > ltpda
view m-toolbox/classes/@plist/setPropertyForKey.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
% SETPROPERTY set a property from a specified parameter to a given value. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DESCRIPTION: set a property from a specified parameter to a given value. % If the property name exists then replace the value otherwise % add this property. % % CALL: obj = obj.getProperty(key, propertyName, value); % % INPUTS: key: Key for the parameter % propertyName: Property name of the value % value: Value for the property % % VERSION: $Id: setPropertyForKey.m,v 1.1 2009/07/14 16:13:20 ingo Exp $ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function obj = setPropertyForKey(obj, key, propertyName, val) if nargin ~= 4 error('### This method works only with four inputs.'); end for ii = 1:numel(obj.params) if strcmpi(obj.params(ii).key, key) obj = copy(obj, nargout); obj.params(ii).setProperty(propertyName, val); break; end end end