• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to insert not editable text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >How to insert not editable text (From: Ferhat Ayaz <email@hidden>)
 >Re: How to insert not editable text (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: CoreAnimation removeFromSuperlayer flicker
  • Next by Date: Re: CoreAnimation removeFromSuperlayer flicker
  • Previous by thread: Re: How to insert not editable text
  • Next by thread: CoreAnimation removeFromSuperlayer flicker
  • Index(es):
    • Date
    • Thread