Getting a list of possible property values

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting a list of possible property values

LukasHehn
Hi,

I am writing a plugin in which I would have some dropdown menus like in the
device property browser for certain device properties. I would also like
these to automatically update with the new value's label if the label is
changed in the config file.

Right know I can only think of a workaround on launch where I cycle through
all possible states and then use mmc.getProperty to get the current value,
but isn't there a way to do this without cycling through all possible
values?

best,

Lukas Hehn



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Getting a list of possible property values

JonD
Administrator
Hi Lukas,

I'm don't think I completely understand your question but there are some
Core methods related to properties that might be useful including these
(documented at
https://valelab4.ucsf.edu/~MM/doc/mmcorej/mmcorej/CMMCore.html)

- getProperty(java.lang.String label, java.lang.String propName)
- getAllowedPropertyValues(java.lang.String label, java.lang.String
propName)
- getDevicePropertyNames(java.lang.String label)

You might also try digging through the code for the Property Browser in case
there is something useful:
https://valelab4.ucsf.edu/trac/micromanager/browser/mmstudio/src/org/micromanager/PropertyEditor.java

Jon



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Getting a list of possible property values

Vikram Kopuri
How about "systemConfigurationLoaded()" method , which is part of the "MMListenerInterface" interface


This function might be called whenever the config file is loaded , so you can redo the  getLoadedDevices()  and   getDevicePropertyNames(java.lang.String label)  again.  
~~~~~~~~~~~~~~~~~~~~~~
Vikram G Kopuri



On Thu, Oct 11, 2018 at 8:58 AM JonD <[hidden email]> wrote:
Hi Lukas,

I'm don't think I completely understand your question but there are some
Core methods related to properties that might be useful including these
(documented at
https://valelab4.ucsf.edu/~MM/doc/mmcorej/mmcorej/CMMCore.html)

- getProperty(java.lang.String label, java.lang.String propName)
- getAllowedPropertyValues(java.lang.String label, java.lang.String
propName)
- getDevicePropertyNames(java.lang.String label)

You might also try digging through the code for the Property Browser in case
there is something useful:
https://valelab4.ucsf.edu/trac/micromanager/browser/mmstudio/src/org/micromanager/PropertyEditor.java

Jon



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Getting a list of possible property values

LukasHehn
In reply to this post by JonD
Hi Jon,

Thanks for your help. I guess I just missed getAllowedPropertyValues in the
documentation, but that is exactly what I was looking for!

Lukas



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general