Prev: 2d matrix compare
Next: saveas eps level 2?
From: Steven Lord on 17 May 2010 10:09 "Aleksandra Krkoleva" <alekk_02(a)yahoo.com> wrote in message news:hspe7v$qoq$1(a)fred.mathworks.com... > "Steven Lord" <slord(a)mathworks.com> wrote in message > <hsjjaq$fpr$1(a)fred.mathworks.com>... *snip* > Thanks, As you've guessed, Class A defines ListenToB and now it works > fine. If anyone else has similar problem, the syntax can be: > function ListenToB(bobj, aobj) %bobj is obj in classB and is source, aobj > is obj in classA Looking back at this code 6 months from now, I'd question (even with the comment) whether the ordering of the inputs was correct. I would swap aobj and bobj everywhere in this function, so that the object of the class that defined this method was first in the input list and so addlistener was "obviously" adding a listener to the object of class A, which makes sense for a method of class A. Naming conventions can be powerful ... both in understanding what code does and in confusing the heck out of the person reading the code, if they're subverted :) -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ |