Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Catching actions of fonts "Typography" panel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Catching actions of fonts "Typography" panel



> Delegate methods could be used if there is an editable textview. But what if not? For other things we have "changeFont:, changeColor:,
> changeAttributes:". Unfortunately, neither of them are called by action I have mentioned.

The actions you mentioned, font typography options set via Apple's Typography panel, will send "changeAttributes:" to the first responder. In your method implementation you'll want to call "convertAttributes:" on the "sender", eg:

- (void) changeAttributes:(id)sender
{
	NSDictionary* oldAttrs = [self myCurrentAttributes];
	NSDictionary* newAttrs = [sender convertAttributes:oldAttrs];
	// ferret out changes
}

If you have a NSTextView subclass you can override that method and do the work there just as easily.

~Martin

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Catching actions of fonts "Typography" panel (From: "Rimas M." <email@hidden>)
 >Re: Catching actions of fonts "Typography" panel (From: Mike Abdullah <email@hidden>)
 >Re: Catching actions of fonts "Typography" panel (From: "Rimas M." <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.