Re: workaround: stubborn text attributes in NSTextView
Re: workaround: stubborn text attributes in NSTextView
- Subject: Re: workaround: stubborn text attributes in NSTextView
- From: Kyle Sluder <email@hidden>
- Date: Wed, 27 May 2009 15:34:19 -0700
On Wed, May 27, 2009 at 2:58 PM, Andy Lee <email@hidden> wrote:
> I configured an NSTextView in IB with a custom text color, a bit of dummy text with a custom font, and rich text turned off (i.e., it's plain text). The problem was that when the user deletes all the text, the text view reverts to black Helvetica 12.
Just did this yesterday. Sign yourself up as the text storage's
delegate (or listen for its
NSTextStorageWillProcessEditingNotification) and implement
-textStorageWillProcessEditing: to force your desired attributes.
--Kyle Sluder
_______________________________________________
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