On 06/08/2012, at 10:46 AM, Graham Cox <[email protected]> wrote:

> I'm puzzled as to how the standard "Bold" text menu item works, because it 
> too simply calls addFontTrait: (according to the action set in IB) and has a 
> tag indicating bold. How then does it REMOVE the bold trait? Is the Font 
> Manager manipulating the action of the menu item when it validates it? Would 
> make sense but I can find no documentation to that effect.

How about this: "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 adds a check mark to the Italic Font menu item and changes its tag to 
UnitalicMask. Your Font menu’s items should use the appropriate action methods 
and tags, as shown in Table 6-4." 

Search for "Customizing the Font Conversion System".

-- 
Shane Stanley <[email protected]>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to