KlausBusse wrote:
First thanks for pointing me to the API docs… I had overlooked a number of the parameters, among others the selectionChangeObserver, which should address the selection change issue.
You're welcome Klaus. Unfortunately, selection-change-observer is of no use for detecting changes to (most-selected) target photo, it is only invoked when target photos change (note the 's'), i.e. the set of target photos - thus the reason for the sample code I posted.
KlausBusse wrote:
Any hint what I would need to do to actually change the dialog content?
Not sure what you mean. But the answer in general is: bind UI elements to properties of an observable table.
KlausBusse wrote:
How do I access the UI elements of my dialog after it's been presented?
Depends. For most things you can simply set those observable properties that the UI is bound to (and set change observers..), but also, you can name the UI elements (make them separate lua variables).
KlausBusse wrote:
The toFront call from the onShow callback documentation is a bit weird, is this the call I would have to call from windowWillClose… didn't work for me, though I admit that my Lua skills still need a lot of development… or would I have to do something entirely different to keep the dialog in front?
I know of know good way to keep your dialog box on top. Long-term/persistent floating dialogs are best used by people with multiple monitors.
When you call "toFront" it brings the dialog box to the front alright, but also gives it focus, which means you can't keep it on top else user can not use Lightroom.
It's useful for some cases (when something has happened and you know your dialog should consequently have focus), but it is NOT possible to do what you are trying to do (have it stay above Lr main window, even as user is using Lr proper), or at least I never figured out how (and I did try).
R