Option Menu and modal pickwheel

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
brentj84062
Posts: 18
Joined: Wed Jul 12, 2006 4:40 am

Option Menu and modal pickwheel

Post by brentj84062 » Thu Apr 21, 2011 5:51 pm

I'm overall very impressed with the iOS kit. Something I wasn't expecting when I first installed and started working with it is the Motif theme, which does change how I have to approach and design my application. Not necessarily a bad thing, but I'm stuck on one detail:

I have an option menu that brings up the pickwheel with no problems. But, there is this pesky box with the option menu that I can't seem to get rid of. See the attachment to see what it looks like.

I've messed with blending settings and a few other things, but I can't seem to get rid of this. I would just set the color to match the background it's on, but that background is an image. Any thoughts? Should I just make a custom control and bring up the modal pick wheel by hand?
Attachments
Screen shot 2011-04-21 at 10.39.41 AM.png
Here is what it looks like.
Screen shot 2011-04-21 at 10.39.41 AM.png (20.85 KiB) Viewed 6509 times

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: Option Menu and modal pickwheel

Post by Dixie » Thu Apr 21, 2011 7:47 pm

Hi..

I too have been looking at the modal pick wheel. I have used this script in the iphone simulator and everything runs fine, the pick wheel appears with all 26 items inside it. However, if I use the same script in the iPad simulator, only 7 items appear in the pop-over.

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
end mouseUp
Anyone else seeing this ?

Dixie

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Option Menu and modal pickwheel

Post by bn » Thu Apr 21, 2011 8:00 pm

Hi Dixie,

your script works for me in the Simulator. Livecode 4.6.

I just have to scroll and I see all the entries down to Zulu.

Kind regards

Bernd

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: Option Menu and modal pickwheel

Post by Dixie » Thu Apr 21, 2011 8:07 pm

Hi Bernd...

From the release notes...
On the iPhone, a standard Action Sheet pops up containing the standard pick-wheel user interface element.

On the iPad, a standard pop-over is presented with a list to choose from. The currently selected entry being marked with a check. In this case, if initialIndex is 0, then no item is checked when displayed.

Bernd... It is fine when the list appears in the standard pick-wheel user interface, it is when running as if on an iPad that I have the problem... as only 'Alpha' through to 'Golf' appear in the pop-over.

be well

Dixie

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Option Menu and modal pickwheel

Post by bn » Thu Apr 21, 2011 8:28 pm

Hi Dixie,
as only 'Alpha' through to 'Golf' appear in the pop-over.
that is what I am seeing in the Simulator for the iPad also, but if you scroll the list that pops up you see the rest of the entries. Seems like 7 items is the max that is displayed, the rest is scrolling...

if you give it a 10 as preselected it does not scroll to the 10th line, the 10th line is marked but you have to scroll there. This is the situation as of Livecode 4.6, I have a hunch that that will change soon...

What version of Livecode are you using?

Kind regards

Bernd

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: Option Menu and modal pickwheel

Post by Dixie » Thu Apr 21, 2011 8:41 pm

Bernd...

I've got a red face... I didn't even try to scroll the list in the pop-over... I just stared at it :oops:

Dixie

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Option Menu and modal pickwheel

Post by bn » Thu Apr 21, 2011 9:05 pm

Hi brentj,

the easiest way is probably to do it as Dixie does it in his script. You could put your list into a global variable and use that for the options.

You could also use an options menu button if you set its icon to an image of your choice and the showname to false and adjust width and height to the size of the image then that is what you will see in the simulator. I am not shure wether you want the button to be visible or not.

Kind regards

Bernd

brentj84062
Posts: 18
Joined: Wed Jul 12, 2006 4:40 am

Re: Option Menu and modal pickwheel

Post by brentj84062 » Thu Apr 28, 2011 9:27 pm

Thanks for the feedback, the script works just fine of course, I just wanted to see if using a UI widget would save me a few lines of code :P I'm lazy that way.

Thanks 'all, that helps a lot.

observ3
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 34
Joined: Mon Oct 11, 2010 11:05 pm

Re: Option Menu and modal pickwheel

Post by observ3 » Sun May 01, 2011 3:53 pm

I'm cheating a little on this...
I made option menus, then pushed them off to the side so they are not visible. The user then clicks on a button, which sends a "click" to the menu. After the user makes a selection the label of the button is updated.
Cheating? Yes.
Easy? Yes.
Check out my LiveCode program, WriteSpire, on the App Store!

Post Reply

Return to “iOS Deployment”