imagej / tutorials

ImageJ2 programming examples
The Unlicense
178 stars 114 forks source link

DynamicCommand: combobox in the example never gets updated #69

Open fmeyenhofer opened 5 years ago

fmeyenhofer commented 5 years ago

I just pulled the latest changes of this repository and tried to get DynamicCallbacks running. Now the KindOfThing does not seem to trigger the update of the Thing. I put a breakpoint here and indeed the callback gets triggered.

The question being; am I doing something wrong, or does the MutableModuleItem need a nudge to update the content of its components?

imagejan commented 5 years ago

@fmeyenhofer did you see the comment in the source code?

https://github.com/imagej/tutorials/blob/c78764438d774295d00fc8a4273e4c4f25c8ad46/maven-projects/dynamic-commands/src/main/java/DynamicCallbacks.java#L29-L31

But I don't think any active issue existed so far to track this, so we can now link to this one here 🙂 (although it should likely be in https://github.com/scijava/scijava-ui-swing/issues).

fmeyenhofer commented 5 years ago

yes, I read that a long time ago, but it was not present anymore when I wrote this issue. I found myself writing yet another Swing configuration dialog, because widgets cannot be dynamically updated, so I thought I see where this thing is at....