Consider the following Matlab classes (2009a):
classdef BigDeal < handle properties hugeness = magic(2000); end methods function self = BigDeal() end end end classdef BigProxy < handle properties(Dependent) hugeness end properties(Access = private) bigDeal end methods function self = BigProxy(bigDeal) self.bigDeal = bigDeal; end function value = get.hugeness(self) value = self.bigDeal.hugeness; end end end
Now consider the following uses:
Setup:
>> b = BigDeal b = BigDeal handle Properties: hugeness: [10x10 double] Methods, Events, Superclasses
OneLayer:
>> pb = BigProxy(b) pb = BigProxy handle Properties: hugeness: [10x10 double] Methods, Events, Superclasses
TwoLayers:
>> ppb = BigProxy(pb) ppb = BigProxy handle with no properties. Methods, Events, Superclasses
Question: Why can't my two-layer proxy see hugeness when there can be one layer? Dependent properties can be calculated - but for some reason this happens only on one layer for some reason?
Update: See my answer below for a workaround.
source share