Set "items" to a binding with a transform function that returns MyArray [prop.my_value], where "prop" is the property table for the dialog. See page 106 of the Lightroom SDK Guide for an example of using a transform function.
Thank you for the reply. I've done this.
I have one more question. How can I call a function when the textbox or slider change? Now I call a function, only when "button ok" is clicked.
1 person found this helpful
How can I call a function when the textbox or slider change?
There are two ways of doing that. You can use a binding with a transform() function that calls your desired function, or you can add an observer to the value property of the edit_field or slider (see page 184 of the SDK Guide).
Many thanks for your answer.
As far as I see, we can capture an editbox value only when lost the focus. There is no option for, like in classical development languages, capture the change or
There is no option for, like in classical development languages, capture the change or keypress? Correct?
Use the "immediate" property for viewFactory:edit_field() -- then observer and transform functions will be called each time the user types a key. See the API Reference for LrView for details.