NSTextView and limiting text attributes via delegate
NSTextView and limiting text attributes via delegate
- Subject: NSTextView and limiting text attributes via delegate
- From: Scott Lehman <email@hidden>
- Date: Fri, 3 Feb 2006 15:01:04 -0800 (PST)
Hi all,
I have an NSTextView, but want to limit the kinds of
formatting that can be used in it. The new delegate
method
textView:shouldChangeTypingAttributes:toAttributes:
caught my eye as a good place to start, however it
doesn't seem to do what I expect.
For example, when the method is called on my delegate
with some text slected, it receives:
{
NSFont = "Helvetica 21.00 pt. P [] (0x003b0aa0)
fobj=0x003ed440, spc=5.83";
NSUnderline = 1;
}
The delegate method returns a new dictionary without
the underline attribute:
{NSFont = "Helvetica 21.00 pt. P [] (0x003b0aa0)
fobj=0x003ed440, spc=5.83"; }
But the text in the text view still gets underlined.
What is the proper use of this delegate method?
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