Skip to main content
johnrellis
Legend
January 17, 2022

P: SDK: LrView.bind (key) fails when "key" contains a period

  • January 17, 2022
  • 12 replies
  • 2205 views

LrView.bind (key) creates a non-working binding when "key" contains a period. To reproduce, install this plugin:

https://www.dropbox.com/s/fhx9521z9re47ro/bind-bug.lrdevplugin.2022.01.16.zip?dl=0 

 

and then do File > Plug-in Extras > Bind Bug. That will produce this window:

 

The first checkbox should be unchecked (white), not in the mixed state (hyphen).  Tested on LR 11.1 / Mac OS 11.6.2.

 

Just one more SDK bug to work around.

 

Here's the script for the Bind Bug command:

 

local LrBinding = import "LrBinding"
local LrDialogs = import "LrDialogs"
local LrFunctionContext = import "LrFunctionContext"
local LrView = import "LrView"

local bind = LrView.bind
local f = LrView.osFactory()

local key1 = "x.y"
local key2 = "x_y"

LrFunctionContext.callWithContext ("main", function (context)
    local prop = LrBinding.makePropertyTable (context)
    prop [key1], prop [key2] = false, false
    assert (prop [key1] == false)
    assert (prop [key2] == false)
    LrDialogs.presentModalDialog {title = "Bind Bug", 
        contents = f:column {bind_to_object = prop,
            f:checkbox {title = "Key " .. key1, value = bind (key1)},
            f:checkbox {title = "Key " .. key2, value = bind (key2)}}}
    end)

 

 

12 replies

Rikk Flohr_Photography
Community Manager
Community Manager
June 14, 2022

Greetings,

 

The SDK will be updated later this week (June 13). The update contains a fix for this issue.  Please download and the latest version of your application via the Adobe Creative Cloud Application or your respective device app store.

If you do not see the update (Mac and Win) you can refresh your Creative Cloud App with the keyboard shortcut [Ctrl/Cmd]+[Alt/Opt]+[ R ]. 

 

Note: App store availability can take several days for the update to appear and be available. 

 

Thank you for your patience.

Rikk Flohr: Adobe Photography Org
Rikk Flohr_Photography
Community Manager
Community Manager
January 17, 2022

Setting status - adding bug number

Rikk Flohr: Adobe Photography Org