Re: How to insert not editable text
Re: How to insert not editable text
- Subject: Re: How to insert not editable text
- From: "Sherm Pendley" <email@hidden>
- Date: Sat, 14 Jun 2008 13:59:23 -0400
On Sat, Jun 14, 2008 at 9:55 AM, I. Savant <email@hidden> wrote:
>> I guess I have to use the NSMutableAttributedString methods but I could
>> not find in the documentation the attribute names to make a text portion non
>> editable.
>
> Hint: This isn't an attribute, it's handled by text system delegate
> methods.
There's no standard "read-only" attribute that the higher-level text
system recognizes and supports automatically, but attributed strings
(and, by inheritance, NSTextStorage) can manage any name/value string
pairs as attributes - not just the ones that built-in Cocoa classes
use. So you can store, search, and fetch your own attributes for your
own classes' use. You just have to provide the logic for recognizing
and handling them, and as Savant says, a good place to put that logic
is in NSTextView delegate methods.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
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