view m-toolbox/m/gui/ltpdv/callbacks/ltpdv_properties_apply.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 (2011-12-07)
parents
f0afece42f48
children
line source
+ − % LTPDV_PROPERTIES_APPLY callback for apply button on the object properties
+ − % panel.
+ − %
+ − % M Hewitson 26-08-08
+ − %
+ − % $Id: ltpdv_properties_apply.m,v 1.1 2008/09/02 07:51:47 hewitson Exp $
+ − %
+ −
+ − function ltpdv_properties_apply(varargin)
+ −
+ − % Handles
+ − myh = varargin{1};
+ − oldVals = varargin{end-2};
+ − obj = varargin{end-1};
+ − mainfig = varargin{end};
+ − panh = get(myh, 'Parent');
+ −
+ − % go through each label and edit box in order
+ − lhs = findobj(panh, 'Style', 'text');
+ − ehs = findobj(panh, 'Style', 'edit');
+ −
+ − for kk=numel(lhs):-1:1
+ − fcn = get(lhs(kk), 'String');
+ − val = get(ehs(kk), 'String');
+ −
+ − % check the value has changed
+ − ov = oldVals{numel(lhs)-kk+1};
+ − if ~strcmp(val, ov)
+ − feval(fcn, obj, val);
+ − end
+ − end
+ −
+ − % Refresh object list
+ − ltpdv_refresh_object_list(mainfig);
+ −
+ − display(obj)
+ − end