Re: exceptions when NSTextStorage initialized with empty string
Re: exceptions when NSTextStorage initialized with empty string
- Subject: Re: exceptions when NSTextStorage initialized with empty string
- From: Martin Hewitson <email@hidden>
- Date: Thu, 8 Apr 2010 05:57:58 +0200
On Apr 7, 2010, at 10:50 PM, Ross Carter wrote:
> On Apr 7, 2010, at 11:52 AM, Martin Hewitson <email@hidden> wrote:
>
>> Hi Kyle,
>>
>> At the moment it does nothing but call super. I was using it to handle line-wrapping, but in the process of debugging this problem it's reduced to
>>
>> - (void)insertText:(id)aString
>> {
>> [super insertText:aString];
>> }
>
> I would set a breakpoint here and examine a description of the textStorage and the layoutManager. Also, are you creating the NSTextStorage from an empty string? Nil? Or possibly some other value?
Sometimes the NSTextStorage is created from an empty string, sometimes not. In the case the string is empty, I get the exceptions. If the string is not empty, I don't get the exceptions. A single whitespace character in the string is enough to stop the exceptions.
Martin
>
> _______________________________________________
>
> 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: email@hidden
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
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