subclassing NSMutableAttributeString with int attributes only?
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.