• 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: using the text system to implement styles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using the text system to implement styles


  • Subject: Re: using the text system to implement styles
  • From: Todd Ransom <email@hidden>
  • Date: Wed, 6 Jul 2005 14:59:15 -0600

On Jul 6, 2005, at 1:39 PM, Douglas Davidson wrote:

Alternatively, you could use a custom text storage subclass, that would store only your custom attributes, but would synthesize the corresponding standard attributes in response to any inquiry. You would need to make sure to invalidate layout in the layout manager for the appropriate ranges, however.


Thanks for replying, Douglas.

If I understand you correctly, I can just subclass NSTextStorage rather than messing with drawing code. Whenever a request comes in for a range with a style attribute attached I would return an attributed string with the appropriate attributes. One more question.

Can I prevent the storage of standard attributes in the NSTextStorage subclass just by overriding setAttributes:range: to not store them in the underlying attributed string? Or will this approach cause me other problems?

Thanks,
TR
_______________________________________________
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


  • Follow-Ups:
    • Re: using the text system to implement styles
      • From: Douglas Davidson <email@hidden>
References: 
 >using the text system to implement styles (From: Todd Ransom <email@hidden>)
 >Re: using the text system to implement styles (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Cocoa method to know the public IP?
  • Next by Date: Re: using the text system to implement styles
  • Previous by thread: Re: using the text system to implement styles
  • Next by thread: Re: using the text system to implement styles
  • Index(es):
    • Date
    • Thread