Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!decwrl!labrea!Portia!Jessica!rick
From: rick@Jessica.stanford.edu (Rick Wong)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Routines to InsertMenuItem()?
Keywords: Menu MPW Insert Item
Message-ID: <4258@Portia.Stanford.EDU>
Date: 30 Nov 88 18:11:03 GMT
References: <2401@udccvax1.acs.udel.EDU> <1020@ccnysci.UUCP>
Sender: news@Portia.Stanford.EDU
Reply-To: rick@Jessica.stanford.edu (Rick Wong)
Organization: Stanford University
Lines: 29

In article <1020@ccnysci.UUCP> cpyang@ccnysci.UUCP (Chao Ping Yang) writes:
>
>					. . . how do I work on the
>Menu Items more than SetItem and AppendMenu, like I would like
>to Insert and remove ...
>
>==Chaoping

From Inside Mac IV, pp. 55-56:

PROCEDURE InsMenuItem(theMenu: MenuHandle; itemString: Str255;
		afterItem: INTEGER);

InsMenuItem inserts an item or items into the given menu where specified by
the afterItem parameter.  If afterItem is 0, the items are inserted before
the first menu item; if it's the item number of an item in the menu, they're
inserted after that item; if it's equal to or greater than the last item
number, they're appended to the menu.

The contents of itemString are parsed as in the AppendMenu procedure.  Mul-
tiple items are inserted in the reverse of their order in itemString.


PROCEDURE DelMenuItem(theMenu: MenuHandle; item: INTEGER);

DelMenuItem deletes the specified item from the given menu.


Rick Wong.