Dynamic table for popup_menu
I'm trying to attach some dynamic information to a popup_menu (pulldown) object in the export dialog.
I'm retrieving the data through an asynchronous task such as:
SYPNEventResults = '';
local LrDialogs = import "LrDialogs"
local LrHttp = import "LrHttp"
import "LrTasks".startAsyncTask( function()
SYPNEventResults, hdrs = LrHttp.get( "http://dev.seeyourphotos.net/cgi-bin/lightroom-event-list.cgi?photographer_id=20060207")
end )
This does succcessfully query the server and place a chunk of values in the SYPNEventResults variable like this:
{ title = "Lab Event", value = "Lab Event" },
{ title = "Karsten", value = "Karsten" },
When I try to use this to populate the contents of the pulldown object (below), what is shown is all of the
values as one long string rather than a list of events to choose from. I'm presuming I'm missing a setp to
bind this somehow differently.
viewFactory:popup_menu {
items = {
SYPNEventResults
},
value = LrView.bind('eventname2'),
width_in_chars = 40,
},
In summary, I'm trying to popuulate a custom dialog pulldown where the user selects from an event list retrieved from the server where that value can in turn be used in other parts of the dialog/ftp upload.
I'm new to Lightroom, so please take that into account in your answer.
Thanks in advance for any help.
