From: Richard on
Is there any way to 'watch' a user defined object property to determine each time its accessed(not modified, just read or used) when my code is running? Don't see anything in the debug menu for this??
From: Jan Simon on
Dear Richard,

> Is there any way to 'watch' a user defined object property to determine each time its accessed(not modified, just read or used) when my code is running?

If the "object" is a function, a simple break point does it. If the "object" is a DOUBLE array, there is no solution for this. For an OO-object I assume a solution should be possible, but I'm not a OO-crack.

Kind regards, Jan
From: Richard on
"Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <i3u1nk$pn7$1(a)fred.mathworks.com>...
> Dear Richard,
>
> > Is there any way to 'watch' a user defined object property to determine each time its accessed(not modified, just read or used) when my code is running?
>
> If the "object" is a function, a simple break point does it. If the "object" is a DOUBLE array, there is no solution for this. For an OO-object I assume a solution should be possible, but I'm not a OO-crack.
>
> Kind regards, Jan
Hi Jan, I'm afraid its an OO object..Anyway think I've mangaed a workaround but wouldn't it be a useful feature! Also, thanks for your response to my earlier crash question but It was a matlab crash rather than a PC crash. Anyway, I've changed loads of lines of code since then trying to speed up with great success so I'm runnign again to see if the problem still exists. It might just disappear! my code does that sometimes...
thanks
From: Matt J on
"Richard " <REMOVETHISrcaldwellie(a)yahoo.com> wrote in message <i3trbc$c7g$1(a)fred.mathworks.com>...
> Is there any way to 'watch' a user defined object property to determine each time its accessed(not modified, just read or used) when my code is running? Don't see anything in the debug menu for this??
=========

Sure. Just write property.set() and property.get() methods for the property and include a line of code that prints/displays whatever alert it is you're interested in seeing.