Re: -replaceTextStorage: problem
Re: -replaceTextStorage: problem
- Subject: Re: -replaceTextStorage: problem
- From: Douglas Davidson <email@hidden>
- Date: Mon, 8 Jun 2009 17:31:50 -0700
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 (email@hidden)
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:
This email sent to email@hidden