Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Trouble with NSAttributedString

Trouble with NSAttributedString
Thread Tools
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Mar 31, 2003, 06:04 PM
 
I have a strange problem with an NSAttributedString object where I get the runtime errors below:

Code:
*** Assertion failure in -[NSRLEArray objectAtIndex:effectiveRange:], String.subproj/NSAttributedString.m:1002 Access invalid attribute location 0 (length 0)
I guess that means that some attribute applies to some text range that is not there.

The error occurs with the code:

Code:
- (NSAttributedString *)blah { return blah; }
Most of the time it works fine. It only produces the error if the string has no text, but does have some attribute applied to it, but ONLY after it has been archived (to file) and unarchived again (from file).

Can anyone shed any light on why this happens only after archiving and unarchiving, or give me any more information on what the error actually means?

(where "blah" is the NSAttributed string in question)
(Last edited by Brass; Mar 31, 2003 at 06:26 PM. )
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:18 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2