I’ve a data list like this:
set allVideoList to {iMovie:{eng:{"video iMovie 1 en", "video iMovie 2 en"}, ita:{"video iMovie 1 it", "video iMovie 2 it"}}, iWeb:{enu:{"video Web 1 en", "video Web 2 en"}, ita:{"video Web 1 it", "video Web 2 it"}}}
I wish to dinamically crate a third popup menu by selecting values from one popup button with languages (langMenu) and one popup button with application name (appsMenu). This means that when a language or a app is selected, titles in the third popup button are dinamically update.
I try this:
on action theObject
if the name of theObject is equal to "appsMenu" then
set currentApp to title of popup button "appsMenu" of window "main"
end if
if currentApp is equal to "iMovie '09" then
set appsList to "iMovie"
else if currentApp is equal to "iWeb '09" then
set appsList to "iWeb"
end if
if the name of theObject is equal to "langMenu" then
set currentPopupValue to title of popup button "langMenu" of window "main"
end if
if currentPopupValue is equal to "English" then
set langList to "eng"
else if currentPopupValue is equal to "Italian" then
set langList to "ita"
end if
set thevideoList to (get langList of appsList of allVideoList)
set videoMenuButton to popup button "videoMenu" of window "main"
my BuildPopupMenus(videoMenuButton)
end action
It work if I use only one value as variable, but I can’t get langList and appsList values together.
Is it possible? or another way is better?
Thanks in advance.