On 16/09/2009, at 3:38 PM, Kyle Sluder wrote:
Oh, you just made the text system *very* mad. Somewhere in the soca it says you must use -[NSTextStorage setTexrStorage:] to do what you want. You don't want to know the morass of code we have in OmniOutliner to support moving the text system around, because we don't want to create NSLayoutManagers for empty rich text cells.
Yes, it looks like that wasn't a good approach, and I'm not doing it now (makes you wonder what the method is provided for). Instead, I just use -replaceCharactersInRange:<the entire range> withAttributedString:, so the text storage object now just sticks around for the lifetime of the document. That stops undo complaining about invoking on a released object (the text storage), but it's still over-releasing its internal bits if you try and flush out the text tasks when editing ends. I'm pretty sure that we ought to be allowed to do that!
--Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com