Re: Bad solution for RTF template?
Re: Bad solution for RTF template?
- Subject: Re: Bad solution for RTF template?
- From: Aaron Tuller <email@hidden>
- Date: Mon, 2 Jun 2003 20:09:39 -0700
also check out the awesome -stringByReplacingKeysInDictionary:
startingDelimiter: endingDelimiter: removeUndefinedKeys: category
method on NSString in OmniFoundation if you're doing any sort of
templating. Just create a NSDictionary of your replacements and
you're good to go. I'm not sure how it would affect your
NSMutableAttributedString but just something to keep in the arsenal.
I use it all the time...well more than I would have thought.
there's so much good stuff buried in OmniFoundation, almost every
time I've thought, hey I wish there was a method that does this, it's
there.
-aaron
The problem I'm having is in doing this in a sane way -
NSMutableAttributedString doesn't have a
replaceOccurrencesOfString:withString:options:range: method like
NSMutableString does, and I can't find a way to replace characters in
the string and maintain overall text attributes (bold in the right
spots, font size, etc).
_______________________________________________
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.