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

  • 1
  • Problem
  • Updated 1 year 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}
    end)
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": https://feedback.photoshop.com/photoshop_family/topics/lightroom-sdk-simple-list-doesnt-obey-size-or...

Doesn't resize: https://feedback.photoshop.com/photoshop_family/topics/sdk_simple_list_does_not_resize

Doesn't scroll to current selection: https://feedback.photoshop.com/photoshop_family/topics/lightroom-sdk-simple-list-doesnt-scroll-to-cu...
Photo of John R. Ellis

John R. Ellis, Champion

  • 3905 Posts
  • 1037 Reply Likes

Posted 1 year ago

  • 1
Photo of Sunil Bhaskaran

Sunil Bhaskaran, Official Rep

  • 352 Posts
  • 121 Reply Likes
Official Response
John,
Thanks for reporting it. We could reproduce the issue.
We are looking into it.

Thanks,
Sunil
Photo of John R. Ellis

John R. Ellis, Champion

  • 3903 Posts
  • 1037 Reply Likes
Very good, thanks.