Q:  How can I remove a menu cell from a menu?  I can disable, enable, add, sizeToFit, update, and free, but I cannot get the actual cell to disappear from the submenu.  

A:  You need to remove the cell from the matrix maintained by the menu, and then have the menu resize to fit its new cells.    Here is a code snippet:

	- removeMenuCell:(int)cellNum from:theMenu
	{
		id matrix;

		[theMenu disableFlushWindow];  
		matrix = [theMenu itemList];
		[matrix removeRowAt:cellNum andFree:YES];	// remove cell
		[theMenu sizeToFit];	  // adjust menu to new size 
		[[theMenu reenableFlushWindow] flushWindow];
		return self;
	}

You can disable window flushing before removing the cell to avoid screen flicker, but be sure to reenable it once you're done.  The above method is used if you know the number of the cell you want to remove.  If you only have the menu cell's title, you can do this:

	- removeMenuCellName:(const char*)cellTitle from:theMenu
	{
		int	 i, count;
		id   matrix, cells;
		id 	 cell;
		const char*	 title;

 	   [theMenu disableFlushWindow];
 	   matrix = [theMenu itemList];
 	   cells = [matrix cellList];   // get the List of cells
 	   count = [cells count];
 	   for(i = 0; i < count; i++) 
 	  {      	  
  	      cell = [cells objectAt:i];
		 title = [cell title];
		 if(title && !strcmp(title, cellTitle))
		 { // compare to find correct title
  	          [matrix removeRowAt:i andFree:YES];
  	          break;
   	     }
  	  }
		[theMenu sizeToFit];  // resize menu
		[[theMenu reenableFlushWindow] flushWindow];
		return self;
	}

QA525

Valid for 1.0, 2.0, 3.0