Re: NSMenu Trouble
Re: NSMenu Trouble
- Subject: Re: NSMenu Trouble
- From: Andreas Mayer <email@hidden>
- Date: Sat, 13 Dec 2003 23:19:18 +0100
Am 13.12.2003 um 22:35 schrieb Izon de Bartas:
I was attempting to fire the menu item since it seems to mysteriously
handle this itself (even though its tag and other information remains
the same). I'm THOROUGHLY confused by this.
Right. I found something about that:
http://developer.apple.com/documentation/Cocoa/Conceptual/FontHandling/
Tasks/CustomizingFontConversion.html
"If you provide your own Font menu, you should register it with the
font manager using the setFontMenu method. The font manager is
responsible for validating Font menu items and changing their titles
and tags according to the selected font. For example, when the selected
font is Italic the font manager changes the Italic Font menu item to
Unitalic, and changes its tag to UnitalicMask. Your Font menus items
should use the appropriate action methods and tags. Here are some
examples: [...]"
The problem is that there is only one font menu allowed.
So it seems you _are_ dependant on the existing menu items. *sigh*
You could try to register for the NSMenuDidChangeItemNotification
notification to see when the font menu items get changed and copy those
changes.
bye. Andreas.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.