menupick in optionMenu select the last choosen item
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
menupick in optionMenu select the last choosen item
Hi All
I have noticed that menupick in an optionMenu on iOS select the last choosen item by user.
Is there a way to avoïd this ? (LC 7.05, xCode 6.4, iOS 8.4)
Best regards
Jean-Marc
I have noticed that menupick in an optionMenu on iOS select the last choosen item by user.
Is there a way to avoïd this ? (LC 7.05, xCode 6.4, iOS 8.4)
Best regards
Jean-Marc
https://alternatic.ch
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Re: menupick in optionMenu select the last choosen item
After the user interaction you can set the label of the button to what you want. Of course there are better ways in iOS for accessing a list of items. Look at mobilePick in the dictionary.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
Re: menupick in optionMenu select the last choosen item
Hi quailcreek,
Thanks for reply
On the previous version I use a group with two transparent buttons, one for iOS with mobilepick and one for OS X/windows with menupick.
I wonder if I can simplify and have one btn for each, but although I set the label to empty, menupick select the last choosen item on the list.
Best regards
Jean-Marc
Thanks for reply
On the previous version I use a group with two transparent buttons, one for iOS with mobilepick and one for OS X/windows with menupick.
I wonder if I can simplify and have one btn for each, but although I set the label to empty, menupick select the last choosen item on the list.
Best regards
Jean-Marc
https://alternatic.ch
-
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Re: menupick in optionMenu select the last choosen item
Take a look at menuHistory in the dictionary.
Tom
MacBook Pro OS Mojave 10.14
MacBook Pro OS Mojave 10.14
Re: menupick in optionMenu select the last choosen item
I tried set the menuhistory to 0 or empty but i get same result.
The first item is selected and sent when I click outside the menus list.
The first item is selected and sent when I click outside the menus list.
https://alternatic.ch
Re: menupick in optionMenu select the last choosen item
Can you post the relevant parts of the button script? That will give us more information about which messages it traps and how it manages them.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: menupick in optionMenu select the last choosen item
Here is the script
I expect pItemname = empty if I click outside the menu list but It keep last choosen item
Code: Select all
on menuPick pItemName
set the menuhistory of the target to 0
answer (pItemName = empty)
end menuPick
https://alternatic.ch
Re: menupick in optionMenu select the last choosen item
Thanks, the script helps. Menupick is not triggered if no selection is made. Set the menuHistory in a mouseRelease handler instead.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: menupick in optionMenu select the last choosen item
Hi Jacqueline,
I put a mouserelease in btn script but I get same result
I put a mouserelease in btn script but I get same result
Code: Select all
on mouserelease
set the menuhistory of the target to 0
end mouserelease
https://alternatic.ch
Re: menupick in optionMenu select the last choosen item
I'm not sure what you want the option button to do. I don't see a way to have an option button without a selection. If the menuhistory is 0, the first item in the list will be selected by default when it is clicked. If you set the label to empty, the name will appear by default. What behavior would you like to see?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: menupick in optionMenu select the last choosen item
I want the same behavior on iOS, OS X and windows.
When I click outside the menus list I want to exit from this script. This is what I see on OS X and windows for an option menu.
On iOS if I click outside the menus list it seems ignore the mouseLoc is outside the menus list and doesn't exit.
I choosed option type because popup and pulldown hide all the screen on iOS.
In previous version of my app, I use a group with one transparent btn with mobilepick for iOS and one popup btn for OS X and Windows with menupick
I thought there is a way to avoïd manage this.
When I click outside the menus list I want to exit from this script. This is what I see on OS X and windows for an option menu.
On iOS if I click outside the menus list it seems ignore the mouseLoc is outside the menus list and doesn't exit.
I choosed option type because popup and pulldown hide all the screen on iOS.
In previous version of my app, I use a group with one transparent btn with mobilepick for iOS and one popup btn for OS X and Windows with menupick
I thought there is a way to avoïd manage this.
https://alternatic.ch