Home Segments Index Top Previous Next

727: Mainline

The Mode menu, in turn, has menu items. By using nil in place of an ordinary selector, you defer the need to define a method; if the item is selected, no message is sent:

Menu new 
  title: '~Options';  
  owner: self; 
  appendItem: '~Food Type' selector: #resetListBox; 
  appendSubMenu: (Menu new 
                    title: '~Mode'; 
                    owner: self; 
                    appendItem: '~Fat Calories' selector: nil; 
                    appendItem: '~Total Calories' selector: nil)