Getting Values from viewForCollectionSettings
For my publish service, I defined a UI using the publishServiceProvider.viewForCollectionSettings function. I have a few text boxes where the user can specify a few settings. When the user saves the collection, I want to be able to retrieve what the user entered and pass those values to the web server. I've done this successfully using the endDialogForCollectionSettings function:
function publishServiceProvider.endDialogForCollectionSettings(publishSettings, info) local tbl = info.pluginContext logger:trace(tostring(tbl)) for i, v in tbl:pairs() do logger:trace(tostring(i).." "..tostring(v)) end end
According to the documentation, endDialog... is a blocking call and I should not update the server from that function, but instead use updateCollectionSettings. The problem is, the info param does not receive the pluginContext from the viewFor... function.
The only way I can think of accomplishing this task, is to store it as preferences and then read the preferences. What is the best way to do retrieve the values the user entered in the dialog? Also just to confirm, when storing them, so they are persistent (even after LR is exited), should I store them by using the LrPrefs namepace?