Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
matlab class should listen to events from java class! possible?

Subject: matlab class should listen to events from java class! possible?

From: joe

Date: 4 Jul, 2010 12:04:05

Message: 1 of 2

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

Subject: matlab class should listen to events from java class! possible?

From: Yair Altman

Date: 4 Jul, 2010 16:48:05

Message: 2 of 2

"joe " <b574988@tyldd.com> wrote in message <i0ptbk$6sn$1@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

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us