Date: Jan 30, 2013 2:05 PM
Author: S.K.Mody
Subject: Cannot edit object properties in variable editor after setting private handle

classdef strange

properties (SetAccess = 'private')
hfunc;
end

properties (Access = 'public')
x;
y;
z;
end

methods (Access = 'public')
function s = strange(a, b, c)
s.x = a;
s.y = b;
s.z = c;
end

function s = SetF(s, h)
s.hfunc = h;
end
end

end

s = strange(1,2,3);
--- can edit x, y and z in variable editor.

s = s.SetF(@sin);
---- now cannot edit either x, y or z in variable editor.

s = s.SetF([]);
---- editing re-enabled ----

s = s.SetF(2);
---- no problem---

Why?