Re: NSAttributedString -initWithPath RTFD crash on Lion
Re: NSAttributedString -initWithPath RTFD crash on Lion
- Subject: Re: NSAttributedString -initWithPath RTFD crash on Lion
- From: "email@hidden" <email@hidden>
- Date: Mon, 01 Aug 2011 21:46:19 +0100
On 1 Aug 2011, at 20:48, Martin Wierschin wrote:
> I don't have any advice on the actual crash, but:
>
>> The following workaround seems reliable:
>>
>> // get path to rtf file
>> NSString *filePath = [path stringByAppendingPathComponent:@"TXT.rtf"];
>
> Be aware that would probably miss any images/attachments saved in the RTFD package.
>
Thanks Martin
It turns out that my sample resources don't have any images.
But you are right, any images that I embed don't render when the RTF file is reloaded using the above approach.
I tried loading the RTFD via an NSURL and an NSFileWrapper but the issue persists.
I could try refactoring my code to change the code path.
The problem code path winds through a number of bindings and observations but I don't see why that should effect loading the RTFD.
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com_______________________________________________
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