On Sat, Jun 14, 2008 at 9:55 AM, I. Savant <[EMAIL PROTECTED]> 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]