Dynamic view with LRC SDK in Lua
Hi,
I'm currently doing further development of a Lightroom Classic plugin written in Lua. In the GUI part of it, I need to change parts of the view depending on the current configuration. To be specific I need an amount of f:edit_field() that is not fixed. Anyone got an idea, how this possible. I saw the example in the SDK manual on page 114, but this doesn't feed my needs.
I tried for testing:
local dialogView = f:row {
bind_to_object = propertyTable,
f:group_box {
title = LOC "$$$/lrc-ai-assistant/ResponseStructure/ConfigureResponseStructure=Keywords",
f:edit_field {
value = bind 'keywordCategories'
},
},
}
table.insert(dialogView, f:row {
bind_to_object = propertyTable,
f:group_box {
title = LOC "$$$/lrc-ai-assistant/ResponseStructure/ConfigureResponseStructure=Keywords",
f:static_text {
title = Defaults.defaultKeywordCategories,
},
},
}
)
local result = LrDialogs.presentModalDialog({
title = LOC "$$$/lrc-ai-assistant/ResponseStructure/ConfigureResponseStructure=Configure data generation and mapping",
contents = dialogView,
})
But the part inserted with table.insert doesn't show up. Anybody got an idea, what I'm doing wrong here?
Many thanks in advance
Bastian
