Option Menu and Pick Wheel

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
richardmac
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 211
Joined: Sun Oct 24, 2010 12:13 am

Option Menu and Pick Wheel

Post by richardmac » Thu Dec 23, 2010 10:50 pm

I am working with a friend on a new iPad app, and everything's going well, except I'm struggling with my Option Menu. I have an Option Menu that displays a list of options and it works great in LiveCode, but on the iPad I get a pick wheel and it does not seem to honor "on menuPick."

What is the relationship between the Option Menu, the Pulldown menu, the iOS "pick wheel," and how to translate and make sense of it? I did read the pick wheel thread here in iOS Deployment, but I didn't really follow it.

bendangelo
Posts: 10
Joined: Wed Nov 17, 2010 5:42 pm

Re: Option Menu and Pick Wheel

Post by bendangelo » Fri Dec 24, 2010 6:15 am

Hi richardmac
read my topic Modal Pick Wheel Support and the section Modal Pick Wheel in the ios release note
Regards

richardmac
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 211
Joined: Sun Oct 24, 2010 12:13 am

Re: Option Menu and Pick Wheel

Post by richardmac » Fri Dec 24, 2010 6:37 pm

I read both already and didn't understand them - was hoping to find example syntax. I'm not the sharpest knife in the drawer. Will re-read though and experiment - probably the best way to learn anyway.

richardmac
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 211
Joined: Sun Oct 24, 2010 12:13 am

Re: Option Menu and Pick Wheel

Post by richardmac » Fri Dec 24, 2010 8:31 pm

Ah. Pick wheel is fixed in 4.5.3. Hopefully 4.5.3 will be out soon, yes? I don't want to create a hack if it's going to work with the Option Menu button in 4.5.3.

The sad thing is that my next project is to add sound, and judging from the other posts on problems with sound, it "sounds" like it's not going to be a lot of fun getting working. Sorry for the bad pun.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Option Menu and Pick Wheel

Post by bn » Sat Dec 25, 2010 1:05 pm

Hi Richard,

here is a bare-bones stack that works with the pick wheel in the next release version of Livecode iOS 4.5.3

Kind regards

Bernd
Attachments
iPhonePickWheel.livecode.zip
(2.05 KiB) Downloaded 393 times

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Option Menu and Pick Wheel

Post by bn » Sat Dec 25, 2010 1:13 pm

Hi Richard,

in Livecode 4.5.2 with an optionmenu try this code in the button of the optionmenu

make a field "fPick" to see what is going on. The script local variable "sLabel" stores the initial choice.

Code: Select all

local sLabel

on mouseDown
   put the label of me into sLabel
end mouseDown

on mouseUp
   put sLabel & cr &the label of me into field "fPick"
end mouseUp

on mouseRelease
   put "mouseRelease" into field "fPick"
end mouseRelease

on menuPick pItemName
   put the label of me into field "fPick"
end menuPick
Kind regards

Bernd

richardmac
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 211
Joined: Sun Oct 24, 2010 12:13 am

Re: Option Menu and Pick Wheel

Post by richardmac » Sun Dec 26, 2010 4:07 pm

Thanks much!

Post Reply