Altering range for font changes in NSTextView?
Altering range for font changes in NSTextView?
- Subject: Altering range for font changes in NSTextView?
- From: Scott Lehman <email@hidden>
- Date: Thu, 27 Apr 2006 00:18:07 -0700 (PDT)
Hi,
I've got an NSTextView subclass that has bulleted
lists. If the user selects a range that happens to
include a bullet, I don't want changes to font traits
(i.e. bold or italic) to affect the bullet.
After reading up on the font system, I tried
overriding NSTextView's changeFont: method to call
setSelectedRanges: to exclude bullets before invoking
super's implementation. However even after setting
the ranges (and querying to make sure they're set),
super invokes shouldChangeTextInRange:
replacementString: with the old selection range, and
no font change actually occurs. The delegate does
implement
textView:shouldChangeTextInRanges:replacementStrings:
to return YES.
Is there something else needed to make this work, or
do I need to manually convert and set the fonts in the
multiple ranges myself?
Thanks,
Scott
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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