Best practice for menus...

Paul Dupuis paul at researchware.com
Tue Jan 17 12:49:10 EST 2017


For desktop applications on Windows and OSX, I am lookingf or what
people consider the best practice to be for enabling, disabling, or
updating menu items based on context.

You have so many ways in the LiveCode language to do this:

enable menuItem 2 of menu "Edit"
disable menuItem 3 or menu "File"

get the text of btn "Edit"
if first char of line 3 of it is "(" then delete first char of line 3 of
it -- enables 3 menuItem in Edit menu
set the text of btn "Edit" to it

enable menuitem 2 of btn "File" of grp "Menubar" -- Enable Open

and probably a number of other syntax variations I have forgotten. So is
there one of the many syntax variations for menus that is "Best" (i.e
most reliable, best performance, best balance between reliability and
performance)





More information about the use-livecode mailing list