Printing to tools menu messages from device adapter?

Hello!

Is it possible to foward messages coming from the device straight into micromanager GUI tools menu messages in the device adapter code? (I know that it can be done from beanshell scripts.)

I’ve been trying to look into MM api but havent found anything.

Thanks a lot if someone can help!

Hi Lauri,

I don’t think that I understand what you mean with “GUI tool menu messages”. Can you give a specific example of what you would like to happen? It may be that the “OnPropertyChanged” function in the device adapter is what you are looking for, or it may not be, depending on what you are looking for;)

I would like to print out a text based on checking the values of some registries from the device.

Here’s the picture of GUI tool menu messages I was referring to:

messagebox

That is in-accessible from the device adapter code. The “alerts” are part of the Java GUI, and devices have no knowledge about the GUI, otherwise it would not be possible (as it is now in pymmcore for instance) to use the core and the devices without the GUI.

However, you can call the function “OnPropertyChanged” changed in your device adapter. Then write some Java or Beanshell code that subscribes to the “OnPropertyChanged” event, check that it comes from your device and property, and issue an alert when that is the case.

Thanks a lot for the help!

I’ll look into using “OnPropertyChanged” with Java or Beanshell code.