Re: When do I have to update the typing attributes?
Re: When do I have to update the typing attributes?
- Subject: Re: When do I have to update the typing attributes?
- From: Douglas Davidson <email@hidden>
- Date: Tue, 3 Oct 2006 10:46:54 -0700
On Oct 3, 2006, at 10:04 AM, Jim Correia wrote:
The documentation for -[NSTextView setTypingAttributes:] says:
Typing attributes are reset automatically whenever the selection
changes. If you add any user actions that change text attributes,
you should use this method to apply those attributes to a
zero-length selection.
Is it unnecessary to change the typing attributes when there is a
non-zero length selection? (The reason I ask is that it appears the
-changeFont: action modifies the text storage and changes the
typing attributes for a non-zero-length selection.)
The convention is that user actions that change attributes should
always set the typing attributes. There might not be a subsequent
change in selection before the next typing. You can file a
documentation bug if the documentation does not make this clear.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden