Typing attributes and the location of the insertion point
Typing attributes and the location of the insertion point
- Subject: Typing attributes and the location of the insertion point
- From: Todd Ransom <email@hidden>
- Date: Mon, 3 Mar 2008 11:24:29 -0500
Hello,
I have an application that auto-formats documents as the user types
according to certain industry standards. For instance, it might change
the indent on the text or it might apply bold or italic formatting. I
was doing this using a text storage subclass that would look up the
appropriate attributes in a style table and return those attributes
when asked. For various reasons I am re-designing this to use a
conventional text storage class and delegate methods to apply the
appropriate attributes to text as it is typed. When the user presses
enter they will change styles. I do this by applying the attributes to
the typing attributes for the text view.
This works well when the user is typing at the end of the text. When
the user is typing in the middle of existing text, however, the ruler
and insertion point do not always update to reflect the paragraph
style of the typing attributes. Is this a bug? Or is this by design? I
have tried using -[NSTextView updateRuler] to force the ruler to
update but this has no effect. Is there any way to force the ruler and
insertion point to update properly?
Todd Ransom
Return Self Software
http://returnself.com
_______________________________________________
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