Page 1 of 1

IphonePick

Posted: Fri Feb 08, 2013 7:16 pm
by KennyR
I was wondering how to return the choice that was selected on the modal pick wheel for iOS. I have been reading the release notes and it says that "return the result" gives you the option picked, but it seems like it only gives you the number of the line picked and not the actual text of the selection. I have included Dixie's previous post's script below to illustrate what I mean....

Code: Select all

on mouseUp
   put "Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,Golf,Hotel,India,Juliet,Kilo,Lima,November," & \
   "Oscar,Papa,Quebec,Roger,Sierra,Tango,Uniform,Victor,Whisky,Xray,Yankee,Zulu" into theList
   
   repeat with count = 1 to the number of items of theList
      put item count of theList & cr after pickList
   end repeat
   
   delete the last char of pickList
   
   iphonePick pickList,3
answer the result
end mouseUp

Re: IphonePick

Posted: Sat Feb 09, 2013 9:37 am
by endernafi
Hi Kenny,

Try this:

Code: Select all

on mouseUp
   put "Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,Golf,Hotel,India,Juliet,Kilo,Lima,November," & \
   "Oscar,Papa,Quebec,Roger,Sierra,Tango,Uniform,Victor,Whisky,Xray,Yankee,Zulu" into theList
   
   replace comma with cr in theList
      
   iphonePick theList,3
   put the result into theChoice
   answer line theChoice of theList
end mouseUp

Hope it helps...

Best,

~ Ender Nafi