From: joe on
Hallo,

i have following problem: I use small java API as jar in matlab. It works fine. I can instantiate and use the classes. One of the java classes fires events. I would like to forward the event information to the apropriate Matlab class. I can implement this scenario using matlab classes using event listeners and notifiers. But ist this possible to do it directly from java class to matlab class? Does enybody has an idea? An example would be great.

Thanks Joe
From: Yair Altman on
"joe " <b574988(a)tyldd.com> wrote in message <i0ptbk$6sn$1(a)fred.mathworks.com>...
> Hallo,
>
> i have following problem: I use small java API as jar in matlab. It works fine. I can instantiate and use the classes. One of the java classes fires events. I would like to forward the event information to the apropriate Matlab class. I can implement this scenario using matlab classes using event listeners and notifiers. But ist this possible to do it directly from java class to matlab class? Does enybody has an idea? An example would be great.
>
> Thanks Joe

See http://www.mathworks.com/matlabcentral/newsreader/view_thread/272321

You can also use handle.listener directly on the handle's event name (sans the 'Callback' suffix), as explained here: http://undocumentedmatlab.com/blog/continuous-slider-callback/#Event_Listener

Yair Altman
http://UndocumentedMatlab.com