Path: utzoo!utgpu!water!watmath!clyde!bellcore!decvax!mandrill!gatech!bloom-beacon!husc6!linus!dartvax!eleazar.dartmouth.edu!erics From: erics@eleazar.dartmouth.edu (Eric Schlegel) Newsgroups: comp.sys.mac.programmer Subject: Re: Menu Manager Bug...? Message-ID: <9488@dartvax.Dartmouth.EDU> Date: 24 Jul 88 14:46:06 GMT References: <5005@husc6.harvard.edu> Sender: news@dartvax.Dartmouth.EDU Reply-To: erics@eleazar.dartmouth.edu (Eric Schlegel) Organization: Dartmouth College, Hanover, NH Lines: 40 In article <5005@husc6.harvard.edu> singer@endor.UUCP (Rich Siegel) writes: >Consider the following code: > > AppendMenu(SpecialMenu, ' '); {create a dummy menu item} > SetItem(SpecialMenu, windowCount + 6, wPeek^.TitleHandle^^); > >If the window's name begins with a dash (-), the entire menu item is >a gray line. This would be correct behavior if the string was passed >to AppendMenu, but NOT for SetItem. Inside Macintosh (Volume 1, page 357) >says: > > "SetItem changes the text of the given item to itemString. It doesn't >recognize the metacharacters used in AppendMenu; if you include them in >ItemString, they will appear in the text of the menu item." > >Is this a new bug, a "feature", or am I completely off base? > >Thanks for any insights... > > --Rich This is a "semi-feature" of the standard menu definition function. When AppendMenu sees an item beginning with a dash, it actually does nothing special with the item and just inserts it literally into the menu record. When the menu definition function draws the menu, however, it draws any line beginning with a dash as a grayed-out line of dashes. Given that this is the problem, you might try inserted an invisible character before the dash so that the dash isn't the first character in the item. Hope this helped... Eric ------ Eric Schlegel | DISCLAIMER: I'm just a poor college student, eric.schlegel@dartmouth.edu | which means I'm not responsible for what I eric.schlegel@dartvax.uucp | say and I can't pay you if you sue me anyway.