Atari Developers RT
Category 2,  Topic 1
Message 18        Thu May 13, 1993
MIKE-FULTON                  at 23:26 EDT
 
TO:   Atari Developers

FROM: Atari TOS Group

Subject: Hierarchical menus

Date: May 5, 1993

It has come to our attention that the function menu_attach() contains a bug. 
The menu_attach() function will only attach a submenu to a menu item. 
Deletions, inquiries, and changes will cause a bus error.

This bug affects the current version of Falcon030 TOS (4.04) and MultiTOS
version 1.0 & 1.01.  Future versions will have this bug fixed.

Please note that all submenu attachments are automatically deleted when the
application is terminated.  Therefore, it is not necessary for the application
to call menu_attach() with the delete parameter.

If an application MUST change or delete a submenu attachment, there is a
workaround:

To DELETE a submenu attachment:

   1) clear bit 11 of the parent menu item's ob_flag field.

   2) clear the upper byte of the parent menu item's ob_type.

   3) clear the right arrow in the parent menu item's text.


To CHANGE a submenu attachment from one submenu to another:

   1) Perform the DELETE to the menu item as shown above.

   2) Attach the new submenu to the main menu item using
      menu_attach().



Unfortunately, there is no workaround for inquiring about a submenu's
parameters.

In addition, performing a DELETE in this manner does not reduce the number of
active submenu attachments.  It simply breaks the 'link' between the parent
menu item and a submenu.  The limit of 64 submenu attachments must still be
taken into consideration.


----------
