What is the best way to relate the states of several NSMenuItems as seen in many application’s View → Sort By menus, so that they are mutually exclusive? Here a screenshot from Mail as example:
I found the following passage in the documentation but am not sure how to implement this:
You can use states to implement a group of mutually exclusive menu items, much like a group of radio buttons. For example, a game could have three menu items to show the level of play: Beginner, Intermediate, and Advanced. To implement a such a group, create one action message that they all use. This action message changes the appropriate setting, and then reflects that change by unchecking the currently checked item and checking the newly selected item.