LIghtroom SDK: simple_list() can't start out as disabled, freezes up (Windows only)

  • 1
  • Problem
  • Updated 2 years ago
  • In Progress
viewFactory:simple_list() freezes if it is initially disabled when the dialog first starts and then enabled later as the result of a user action.  This happens on Windows 10 and Windows 8.1, with CC 2015.10.1 and 5.7.1.  It doesn't occur on OS X.   

To reproduce: 

1. 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.postAsyncTaskWithContext ("", function (context) 
    local prop = LrBinding.makePropertyTable (context)
    prop.cb = false
    local items = {}
    for i = 1, 10 do table.insert (items, {title = i, value = i}) end
    local controls = f:column {bind_to_object = prop,
        spacing = f:control_spacing (),
        f:checkbox {title = "Enable simple list", value = bind ("cb")},
        f:simple_list {items = items,
            enabled = LrBinding.keyEquals ("cb", true)}}
    LrDialogs.presentModalDialog {title = "Simple List Bug", 
        contents = controls}
2. Click the checkbox and notice that though the simple_list control appears enabled, you can't select any items or scroll it.

3. Change the line "prop.cb = false" to "prop.cb = true".  

4. Run the script and notice that the simple_list control properly enables whenever the checkbox is checked.

simple_list() has lots of other problems -- it needs some love:

Doesn't obey "size" or "font":

Doesn't resize:

Doesn't scroll to current selection:
Photo of John R. Ellis

John R. Ellis, Champion

  • 4468 Posts
  • 1187 Reply Likes

Posted 2 years ago

  • 1
Photo of Sunil Bhaskaran

Sunil Bhaskaran, Official Rep

  • 420 Posts
  • 147 Reply Likes
Official Response
Thanks for reporting it. We could reproduce the issue.
We are looking into it.