I have an option menu which I've assigned a custom property to. I've got a number of values in the this custom property. When a user selects a value, I need to get the equivalent pair from my custom property. So if my user picks item 2 from the option menu, I would like the value second value from my custom property. I thought the menuhistory would return the line number, which I could then use to pick the relevant value from my custom property, but it only returns line number 1 regardless which value I choose from the the option menu. Any ideas where I've gone wrong, think I have the code correct.
Code: Select all
on MenuPick pItemName
put pItemName into button "SupplierID"
put the menuhistory of me into tLine
put line tLine of the cMyProperty of me into tValue
put tValue into field "SupplierName"
end MenuPick
Jalz