KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Managing the check mark for menu items
PRODUCT: 4D | VERSION: 12 | PLATFORM: Mac & Win
Published On: February 24, 2011

The documentation for SET MENU ITEM MARK suggests using Char(18) on Mac as the mark parameter, such as:

SET MENU ITEM MARK(mymenu;1;Char(18))


This properly displays the menu item as "checked" and everything will work fine, but it can cause some problems when trying to test if a menu item is currently checked or not. The simple test of:

Get menu item mark(myMenu;1)=""


Can return true even if the mark is Char(18) and not blank. Instead the Position command needs to be used with the new * parameter. A test that works all the time would be:

Position(Get menu item mark(myMenu;1);Char(18);*)=1


This would return true if marked and false if not.