On Jun 8, 2009, at 12:00 PM, Philip White wrote:

I have subclassed NSTextStorage. Everything works fine when I initially setup the text system objects; my NSTextView displays what I want it to. However, when I later call NSLayoutManager's replaceTextStorage:, it simply does not do anything. It doesn't complain or anything. If I check what that layout manager's associated text storage is immediately after calling replaceTextStorage, it is the old one. Nothing is logged, no exceptions are thrown, nothing changes.

Does this give anyone enough information to offer a suggestion?

Not really. -replaceTextStorage: is pretty simple, so you should check your code and make sure everything is hooked up correctly beforehand, and that you are calling the right methods on the right objects. You can ask the old text storage and the new text storage for their layout managers before and after, and break on - [NSTextStorage removeLayoutManager:] and -[NSTextStorage addLayoutManager:] to make sure they're being called. You don't say what your NSTextStorage subclass looks like, but if you're overriding those methods you should check what you're doing, and make sure you're calling the super methods.

Douglas Davidson

_______________________________________________

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

Reply via email to