• 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
subclassing NSMutableAttributeString with int attributes only?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

subclassing NSMutableAttributeString with int attributes only?


  • Subject: subclassing NSMutableAttributeString with int attributes only?
  • From: jerome LAURENS <email@hidden>
  • Date: Thu, 2 May 2002 14:37:55 +0200

Hi,

in my quest for performance, I'd like to subclass NSMutableAttributeString.

In fact, the attributes allowed for my string are all known and belong to a finite set of attributes, think for example to a C source file, where the attributes can take 4 values describing: 1 preprocessor macros, 2 keywords, 3 delimiters and 4 the rest. If I use standard attributed string, i will have to code each value with a NSDictionary, and then my app will spend time comparing dictionaries. This is what i actually do and sampler tells me that dictionaries comparision is heavily used.

How should i design my own NSMutableAttributeString in such a way that attributes are not dictionaries but simple integers.

TIA
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Notification problem
  • Next by Date: design: NSTextView subclass with custom key binding
  • Previous by thread: Is Apple's UTF-8 decoder safe?
  • Next by thread: design: NSTextView subclass with custom key binding
  • Index(es):
    • Date
    • Thread