Prev: algebraic loop error- automatic gain control
Next: Data Exchange Between Matlab and Third Party Software likeMetatrader 4
From: Yair Altman on 22 Jun 2010 07:49 "Darik " <dgambleDEL(a)uwaterlooDEL.caDEL> wrote in message <ff86su$p1i$1(a)fred.mathworks.com>... > Is there a way to abort a requested SET call in a > PropertyPreSet listener callback? > > schema.prop objects have an access flag called 'AbortSet' > that would suggest this is possible, but I haven't found > anything digging through Mathworks' code. > > I know I COULD create a corresponding PropertyPostSet > listener to 'undo' whatever was done, but this gets pretty > unwieldy with linked properties (i.e. setting the XLim > property of an axes changes the XLimMode, XTick, etc.) As a service to the general public who might come across this thread, here is some new information: 1. As noted by Darik, properties for existing objects (that have active instances) cannot be modified. Only newly-created user properties (using the schema.prop function) can be modified and have their meta-property SetFunction modified to some user callback that can intercept and modify the expected value. 2. The meta-property AccessFlags.AbortSet is unrelated to the functionality of intercepting and modifying a set() modification. It just controls whether or not the data is actually re-set (and the callback is executed) when it is not really changed from its existing value. See http://www.mathworks.com/access//helpdesk/help/techdoc/matlab_oop/brkik73.html#bry1hcf 3. The bottom line with regards to Darik's original question is that there is no simple solution. But at least we now know more of the details... Yair Altman http://UndocumentedMatlab.com |