Cannot use a menu
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Cannot use a menu
I long ago made a Scrabble scorekeeper/tile tracker/timer. Useful if you are into that game.
Used in the IDE, it has a single custom Menu (a grouped button, of course) containing a menuPick handler with a switch statement that deals with a handful of options.
All of a sudden, although the menu works, in the sense that the menuItems it contains do indeed drop down, no menuPick message is sent upon selecting a subMenu. I can, from msg, send a menuPick message along with a parameter to the button itself, and that works just fine. But something has blocked any message from originating from the menu selection process itself.
I have to admit I was fooling around with the stack when I noticed the issue. What is blocking, intercepting, whatever, to the process of selecting a menuItem from that button? In other words, what did I do?
Craig
Used in the IDE, it has a single custom Menu (a grouped button, of course) containing a menuPick handler with a switch statement that deals with a handful of options.
All of a sudden, although the menu works, in the sense that the menuItems it contains do indeed drop down, no menuPick message is sent upon selecting a subMenu. I can, from msg, send a menuPick message along with a parameter to the button itself, and that works just fine. But something has blocked any message from originating from the menu selection process itself.
I have to admit I was fooling around with the stack when I noticed the issue. What is blocking, intercepting, whatever, to the process of selecting a menuItem from that button? In other words, what did I do?
Craig
-
- Livecode Opensource Backer
- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Re: Cannot use a menu
Well, you could post the menu code here.
Re: Cannot use a menu
You are CURSED, Craig, get used to it!




-
- VIP Livecode Opensource Backer
- Posts: 153
- Joined: Wed Aug 26, 2009 7:42 pm
- Contact:
Re: Cannot use a menu
Check the layering of the objects in the group (you said you had a grouped button). Im may be possible the layering got messed up and the menuPick is being sent to an object in the group other than the one with the script in it.
Just a suggestion.
Just a suggestion.
Paul Dupuis
Researchware, Inc.
Researchware, Inc.
Re: Cannot use a menu
Thanks for the replies.
@ Richmond. The code itself is not the issue. I can manually send a "menuPick"message to the menu button and it works fine. I just can no longer invoke that message in the usual way.
@Klaus. Finally someone understands.
@Paul. Good point, which I tested yesterday by searching for all "menuPick" handlers in the stack. There is only one, the one in the menu button. The parent group containing that button has no handler.
Craig
@ Richmond. The code itself is not the issue. I can manually send a "menuPick"message to the menu button and it works fine. I just can no longer invoke that message in the usual way.
@Klaus. Finally someone understands.
@Paul. Good point, which I tested yesterday by searching for all "menuPick" handlers in the stack. There is only one, the one in the menu button. The parent group containing that button has no handler.
Craig
-
- Livecode Opensource Backer
- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Re: Cannot use a menu
Something else is trapping your mouse.
-
-
-
- VIP Livecode Opensource Backer
- Posts: 153
- Joined: Wed Aug 26, 2009 7:42 pm
- Contact:
Re: Cannot use a menu
Have you checked the menuMode property of the button to make sure it is set to a type that responds to the menuPick message?
Just another suggestion.
menuPick is likely not broken. Most likely there is some reason the menuPick message is not being delivered to the handler script. menuPick is only sent to button that have an applicable menuMode.
Just another suggestion.
menuPick is likely not broken. Most likely there is some reason the menuPick message is not being delivered to the handler script. menuPick is only sent to button that have an applicable menuMode.
Paul Dupuis
Researchware, Inc.
Researchware, Inc.
Re: Cannot use a menu
Paul.
Great suggestion, but the menuMode of the menu button is "pullDown".
Craig
Great suggestion, but the menuMode of the menu button is "pullDown".

Craig
Re: Cannot use a menu
Try a mouseDown or mouseUp handler in the button just to see if anything works.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Cannot use a menu
Could it be that the button is grouped?
I don't know why that would make a difference.
Bob
I don't know why that would make a difference.
Bob
Re: Cannot use a menu
Jacque. Nothing. I even tried "mouseEnter", but the menu button is not really in the menuBar, no? So that makes no sense.
Bob. I think all such buttons, especially when built with the Menu Builder, are grouped. Mine is.
Craig
Bob. I think all such buttons, especially when built with the Menu Builder, are grouped. Mine is.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Cannot use a menu
But something is. If you can reproduce it in a stack that illustrates the issue, posting the stack will give us something to work with.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Cannot use a menu
I assume this is on Mac? Is it possible that the menu group was duplicated and the wrong one is being used as a menu bar? Wild guess, I know.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Cannot use a menu
@Richard. There always is, eh?
@ Jacque. On a Mac. Each stack has five groups, all identical. The menuButton has the same name and owner
I opened an older saved version of my stack, where all works just fine. With both stacks, I did the following:
1- Compared "the properties" of each stack, old and new. They are identical.
2- Each stack has five groups, one of which is the menuButton group. Same group name, same button name in each. Identical scripts in each.
Considering the above two items, I cannot understand why, even though the menu "action" works just fine, no "menuPick" is invoked in the newer stack. This is verified on two different machines.
I am happy to play with this as long as others are willing to, and happy to post my stack, especially if other Scrabble players are interested. I can fix my problem, yet again without understanding it, by simply going back to the old version and update it as per my original intent.
Craig
@ Jacque. On a Mac. Each stack has five groups, all identical. The menuButton has the same name and owner
I opened an older saved version of my stack, where all works just fine. With both stacks, I did the following:
1- Compared "the properties" of each stack, old and new. They are identical.
2- Each stack has five groups, one of which is the menuButton group. Same group name, same button name in each. Identical scripts in each.
Considering the above two items, I cannot understand why, even though the menu "action" works just fine, no "menuPick" is invoked in the newer stack. This is verified on two different machines.
I am happy to play with this as long as others are willing to, and happy to post my stack, especially if other Scrabble players are interested. I can fix my problem, yet again without understanding it, by simply going back to the old version and update it as per my original intent.
Craig
-
- Livecode Opensource Backer
- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Re: Cannot use a menu
Fixing without understanding is an extremely short-term way of looking at things.