widgets-toolbox icon indicating copy to clipboard operation
widgets-toolbox copied to clipboard

Reference to non-existent parameter 'remArgs' in PropertyChangedData class

Open slootsjj opened this issue 1 year ago • 0 comments

Class wt.eventdata.PropertyChangedData references the non-existent parameter 'remArgs'.

Change:

% Any remaining varargin are dynamic property-value pairs
for idx=1:numel(varargin)
    thisProp = varargin{idx};
    thisValue = remArgs.(thisProp);
    obj.addprop(thisProp);
    obj.(thisProp) = thisValue;
end

To:

% Any remaining varargin are dynamic property-value pairs
for idx = 1:floor(numel(varargin) / 2)
    thisProp = varargin{(idx - 1) * 2 + 1};
    thisValue = varargin{(idx - 1) * 2 + 2};
    obj.addprop(thisProp);
    obj.(thisProp) = thisValue;
end

slootsjj avatar Apr 19 '24 11:04 slootsjj