Re: NSAttributedDictionary crash
Re: NSAttributedDictionary crash
- Subject: Re: NSAttributedDictionary crash
- From: Shawn Erickson <email@hidden>
- Date: Sat, 28 Feb 2009 10:05:15 -0800
On Sat, Feb 28, 2009 at 9:40 AM, Michael Vannorsdel <email@hidden> wrote:
> I'm having a problem I'm not sure how to solve. I have a custom view which
> uses an NSAttributedString to draw text which works fine except when it
> draws to a printer context. The NSAttributedDictionary created inside the
> NSAttributedString's initWithString:attributes: gets over released and
> crashes when the global autorelease pool empties.
>
> Looking for suggestions on how to work around this.
I suggest you correct your (very likely is yours) over release issue. :)
With that said I know of at least one quirk when working with
attributed strings that can cause you something like what I think you
are reporting. I cannot recall the specific at the moment other then
it had to do with creating a paragraph style, using that style with
one string, drawing a string, then modifying the style, and using it
for a second string (or something close to that).
If you can post your code it may better jog my memory (sorry my work
system at the office is off or I could look up this issue).
-Shawn
_______________________________________________
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