rob_cole_2221866's profile

4.5K Messages


76.3K Points

Fri, Jun 17, 2011 12:46 AM


Lightroom SDK: combo_box() doesn't work on Windows

[Update: This is still broken in LR 7.0.1 on Windows. See here for details:
- John Ellis]

Combo box is supposed to allow selection of list item *or* keyboard text entry - the latter is broken.Broken on Windows for sure - I don't remember whether bug confirmed on Mac or not.At least since Lr3, not sure about Lr2...Test plugin:

44 Messages


620 Points

11 y ago

Hi Rob,

I took a look at this issue and I believe you can resolve it by adding the property "immediate = true" to your combo-box. I tried this in your specific plug-in and it seemed to resolve the issue.

Note, without the "immediate" the value does get set but you are not guaranteed it will be set immediately. You can see this behavior by adding a button that simply displays a message with the combo box value. When you type in an entry manually and hit the button for the first time, the value is usually not set yet. If you hit the button again it always seems to be set.

I agree this behavior is not ideal- it does seem like the default behavior should have "immediate = true" although I have to investigate the performance impact of this change.


4.5K Messages


76.3K Points

Thanks Paul,

immediate=true will provide a viable work-around for now.

If "unfixed" in next rev, consider at least adding a note to the SDK doc.

Good to know,



6K Messages


103.7K Points

4 y ago

I just wasted an hour re-discovering this bug (which I had me-too'ed six years ago, sigh).  

On Windows, text entry into a viewFactor:combo_box() fails unless the property "immediate = true" is provided. To reproduce, run the following script:
local LrBinding = import "LrBinding"
local LrDialogs = import "LrDialogs"
local LrFunctionContext = import "LrFunctionContext"
local LrView = import "LrView"
local bind = LrView.bind
local f = LrView.osFactory()
LrFunctionContext.callWithContext ("", function (context)
    local prop = LrBinding.makePropertyTable (context)
    local controls = f:column {bind_to_object = prop,
        f:combo_box {value = bind ("valueFalse"), immediate = false},
        f:combo_box {value = bind ("valueTrue"), immediate = true}}
    local result = LrDialogs.presentModalDialog {
        title = "combo_box bug", contents = controls}
    LrDialogs.message (string.format ("immediate = false: '%s'\n" ..
        "immediate = true: '%s'", prop.valueFalse, prop.valueTrue))
Enter "xxx" in the first combo box and "yyy" in the second box.  On Mac, the script executes correctly and produces:

But on Windows, the script produces the following incorrect results: