view m-toolbox/classes/@minfo/setMpackage.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

% SETMPACKAGE Set the property 'mpackage'.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: Set the property 'mpackage'.
%
% CALL:              obj.setMpackage('string');
%              obj = obj.setMpackage('string');
%
% INPUTS:      obj - must be a single minfo object.
%
% VERSION:     $Id: setMpackage.m,v 1.1 2011/04/17 09:21:29 hewitson Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function varargout = setMpackage(varargin)

  obj = varargin{1};
  val = varargin{2};

  if ~ischar(val)
    error('### The value for the property ''mpackage'' must be a string but it is from the class [%s]!', class(val));
  end

  %%% decide whether we modify the minfo-object, or create a new one.
  obj = copy(obj, nargout);

  %%% set 'mclass'
  obj.mpackage = val;

  varargout{1} = obj;
end