Cannot identify the Menubar button clicked under Mac OS

HENRY LOWE hlowe at me.com
Mon Feb 24 17:18:22 EST 2020


The Livecode Lesson 'Update a menu with a list of open windows' recommends placing a mousedown handler in the script of the Menubar group to determine which menu was clicked on:

http://lessons.livecode.com/m/2592/l/126566-update-a-menu-with-a-list-of-open-windows

The suggested code is:

on mouseDown 
	if the short name of the target is "Window" then

However under Mac OS, using LC 9.6.0 (dp2), 'the short name of the target' actually returns the name of the Menubar group not the menu that was clicked.  This appears to be a longstanding bug, first reported in 2007:

https://quality.livecode.com/show_bug.cgi?id=5142

Anyone know of a workaround for this?

Thanks,

Henry



More information about the use-livecode mailing list