Option Menus and "return"

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
rdlankes@iis.syr.edu
Posts: 4
Joined: Sun Dec 19, 2010 6:41 am

Option Menus and "return"

Post by rdlankes@iis.syr.edu » Wed Feb 09, 2011 2:25 pm

I am using the option menu to create a pickwheel list to select a subject (popup buttons don't work on the iPad as I found out and mentioned in the docs). When the user makes a selection, they have to click off the menu to make anything happen...in essence making a selection on the iPad through the option menu doesn't return the results until after they click anywhere else. Is there a way to have the user bring up the option menu, click on the item they want, and then automatically go to a page without having them click elsewhere?

I like the iPhone control iphonePick that at least has a "done" button, but the iPad doesn't.

Here's the code:

Code: Select all

local pItemName
on menuPick pItemName
   switch pItemName
   end switch
   set the label of me to "Threads"
   go cd pItemName of stack "Threads"
end menuPick

RickD
Posts: 31
Joined: Thu Feb 11, 2010 5:47 pm

Re: Option Menus and "return"

Post by RickD » Thu Feb 10, 2011 3:55 am

Hi rdlankes:

This has been fixed in 4.6-DP5.

I tested your code and it works exactly as your request.

Cheers

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Option Menus and "return"

Post by Klaus » Thu Feb 10, 2011 11:54 am

Hi rdlankes@iis.syr.edu,

if you do not differ between the menuitems, you can omit the "switch" part completely:

Code: Select all

local pItemName
on menuPick pItemName
   set the label of me to "Threads"
   go cd pItemName of stack "Threads"
end menuPick
Best

Klaus

rdlankes@iis.syr.edu
Posts: 4
Joined: Sun Dec 19, 2010 6:41 am

Re: Option Menus and "return"

Post by rdlankes@iis.syr.edu » Thu Feb 10, 2011 5:30 pm

Sorry for the stupid question...how do I get 4.6-DP5?

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Option Menus and "return"

Post by Klaus » Thu Feb 10, 2011 6:02 pm

Hi (wo)man with the long nickname,

that is no stupid question at all!

You need to be part of the LiveCode Developer Programm to get hold of
Developer Previews and Betas of new LiveCode versions!

Read more about it here:
http://www.runrev.com/products/livecode ... r-program/


Best from germany

Klaus

Post Reply

Return to “iOS Deployment”