"value = bind( 'a', 'p.group' )" I don't see a two-argument form for LrView.bind() documented in the AP Reference or the SDK Guide, and it doesn't work in my testing either. However, I did observe that these other three methods did work for referencing a second property table in an LrView control hierarchy: - bind {key = "key", bind_to_object = prop2} - bind "prop2.key" - Setting the property "bind_to_object = prop2" in a nested part of the control hierarchy. This script illustrates all three methods: 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 ("main", function (context)
local prop1 = LrBinding.makePropertyTable (context)
prop1.prop2 = LrBinding.makePropertyTable (context)
prop1.value, prop1.prop2.value = "prop1 value", "prop2 value"
LrDialogs.presentModalDialog {title = "Bind",
contents = f:column {bind_to_object = prop1,
spacing = f:control_spacing (),
f:static_text {title = bind "value"},
f:static_text {title = bind "prop2.value"},
f:static_text {title = bind "value",
bind_to_object = prop1.prop2},
f:column {bind_to_object = prop1.prop2,
f:static_text {title = bind "value"}},
f:static_text {title = bind {key = "value",
bind_to_object = prop1.prop2}}}}
end)
... View more