[SOLVED]: Re: exceptions when NSTextStorage initialized with empty string

2010-04-07 Thread Martin Hewitson
OK, bug found. A really silly mistake on my part but I think it's worth reporting in case it saves someone else a headache. My NSTextView subclass has syntax coloring which is called on receipt of NSTextStorageDidProcessEditingNotification. In the method that does the coloring, I had the fol

Re: exceptions when NSTextStorage initialized with empty string

2010-04-07 Thread Martin Hewitson
On Apr 7, 2010, at 10:50 PM, Ross Carter wrote: > On Apr 7, 2010, at 11:52 AM, Martin Hewitson > 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)ins

Re: exceptions when NSTextStorage initialized with empty string

2010-04-07 Thread Ross Carter
On Apr 7, 2010, at 11:52 AM, Martin Hewitson 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]; > }

Re: exceptions when NSTextStorage initialized with empty string

2010-04-07 Thread Martin Hewitson
Yes, they are. Sorry, I was over selective in my first post in an attempt to just show the salient points. Here's a more complete excerpt from the code that sets up the text storage etc: // Get the string from the File entity NSError *error = nil;

Re: exceptions when NSTextStorage initialized with empty string

2010-04-07 Thread Stephen J. Butler
On Wed, Apr 7, 2010 at 1:31 AM, Martin Hewitson wrote: >                // Clean up >                [textContainer release]; >                [layoutManager release]; >                [str release]; Are you sure that all these are balanced releases? The only one you show allocating is layoutMana

Re: exceptions when NSTextStorage initialized with empty string

2010-04-07 Thread Martin Hewitson
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]; } One further piece of info: if I set the layout manager to a

Re: exceptions when NSTextStorage initialized with empty string

2010-04-07 Thread Kyle Sluder
On Apr 6, 2010, at 11:31 PM, Martin Hewitson wrote: 8 TeXnicle0x00010001e85e - [TPTextView insertText:] + 199 You need to show us the code for this method. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@

exceptions when NSTextStorage initialized with empty string

2010-04-06 Thread Martin Hewitson
Dear list, I have an application which uses NSTextStorage objects to provide multiple views of the content of files. In principle, everything seems to be working fine; I can have multiple views of the same document and edit just fine. In most cases the text storage is initialized with some cont