Lightroom SDK: CC 2015.4 broke edit_field's validate function, disabling existing plugins

  • 11
  • Problem
  • Updated 2 years ago
  • Solved
  • (Edited)
LR CC 2015.4 broke the validate() functionality of viewFactory:edit_field() on OS X 10.11.2, but not on Windows 10. This renders my Any Tag plugin inoperable for all of its Mac users.

Below is a script demonstrating the bug. On CC 2015.3 / OS X and on CC 2014.4 / Windows 10, when you type "abc" into the edit field and then hit tab, the validate() function replaces the contents of the field with the uppercase "ABC".  But with 2015.4 / OS X, the validate() function is never called, and the contents are not uppercased.  

Here are screenshots showing before and after tab is typed on 2015.3:

And here are screenshots showing before and after tab is typed on 2015.4:

local LrBinding = import 'LrBinding'
local LrDialogs = import 'LrDialogs'
local LrFunctionContext = import 'LrFunctionContext'
local LrStringUtils = import 'LrStringUtils'
local LrView = import 'LrView'
local bind = LrView.bind
local f = LrView.osFactory()
LrFunctionContext.callWithContext ("test", function (context)
    local prop = LrBinding.makePropertyTable (context)
    local result = LrDialogs.presentModalDialog {
        title = "validate test", 
        contents = f:edit_field {bind_to_object = prop,
            immediate = true, 
            value = bind ("value"),
            validate = function (view, value)
                return true, LrStringUtils.upper (value), nil
    LrDialogs.message ("Contents of edit_field", prop.value)
Photo of John R. Ellis

John R. Ellis, Champion

  • 3154 Posts
  • 754 Reply Likes
  • Frustrated

Posted 2 years ago

  • 11
Photo of Sunil Bhaskaran

Sunil Bhaskaran, Official Rep

  • 250 Posts
  • 75 Reply Likes
Official Response
We have fixed this issue in the latest CC 2015.5 / 6.5 update.