Copy link to clipboard
Copied
I'm trying to set up a simple dialog with an edit field the value of which persists using the code below, called using LrPluginInfoProvider in my info file. What am I doing wrong?
local LrView = import "LrView"
local LrPrefs = import "LrPrefs"
local LrDialogs = import "LrDialogs"
local bind = LrView.bind
local pluginInfoProvider = {}
function pluginInfoProvider.sectionsForTopOfDialog(f, properties )
local prefs = LrPrefs.prefsForPlugin( )
if properties.userName == nil then
properties.userName = prefs.userName or "yyyy"
end
return {
{
title = "Chatter Preferences --",
synopsis = "Chatter, by Kim Aldis",
f:row {
f:column {
spacing = f:control_spacing(),
f:static_text {
title = "Testing:"
},
f:edit_field {
value = bind "userName",
width = 300
}
}
}
}
}
end
return pluginInfoProvider
I think you may need to set the "bind_to_object" property of the returned controls:
f:row {bind_to_object = properties,
f:column {
spacing = f:control_spacing(),
...
Copy link to clipboard
Copied
I think you may need to set the "bind_to_object" property of the returned controls:
f:row {bind_to_object = properties,
f:column {
spacing = f:control_spacing(),
...
Copy link to clipboard
Copied
And as if by magic ...
Thanks John.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now