On 2017-08-09 20:48, Trevor DeVore via use-livecode wrote:
I think this bug report has a recipe for the issue you are seeing:
This has been around for a long time. I don’t know of a workaround
than fully qualifying all object references.
Unfortunately that is a separate issue.
The reason you get that error is because at present the popup button
command requires there to be a mouseStack. So if you cmd-tab away from
the app whilst your mouse is over some stack, and cmd-tab back in - it
will work; if you do not have your mouse over any stack, and do the same
you will get the error.
In fact, you get the same error if you press the shortcut combination
without the mouse over a stack.
I guess the 'popup' command was always intended to be run in response to
a mouse-click - both the ExecPopup function and the 'openmenu()'
function in MCButton have a guard against doing anything if the
mouseStack is empty.
The requirement for a mouseStack seems to be somewhat deeply tied into
the menu code so this could be a little tricky to untangle. (It
certainly seems to be part of the mouse tracking behavior menus need on
Windows and Linux).
So a simple explanation, but not a clear or easy solution.
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
use-livecode mailing list
Please visit this url to subscribe, unsubscribe and manage your subscription