• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Crash when printing (including printing to PDF)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash when printing (including printing to PDF)


  • Subject: Re: Crash when printing (including printing to PDF)
  • From: John Brownie <email@hidden>
  • Date: Fri, 07 Dec 2012 13:54:13 +1000

Fritz Anderson wrote:
On 6 Dec 2012, at 2:47 AM, John Brownie <email@hidden> wrote:

I am working on implementing printing, and have it working to the point where the preview in the print sheet works. However, I get a crash if I then go on to print or go to PDF (Open in Preview, Save as PDF). In the print case, I get this crash:

2012-12-06 18:40:01.757 MyApp[43204:403] -[__NSCFString objectForKey:]: unrecognized selector sent to instance 0x7fbe9f1d9830
What sort of memory management are you using?

The next thing I'd investigate is to see if you're setting or returning an NSString in some method or structure that requires an NSDictionary. Audit your code.


OK, found the problem. It was the print accessory panel returning an array of strings instead of an array of dictionaries for -localizedSummaryItems. Finding exactly what that is supposed to return is a little tricky, an exercise in chasing around the documentation. Weird that it wants the summary information to generate a file name...

John
--
John Brownie, email@hidden or email@hidden
Summer Institute of Linguistics      | Mussau-Emira language, Mussau Is.
Ukarumpa, Eastern Highlands Province | New Ireland Province
Papua New Guinea                     | Papua New Guinea
_______________________________________________

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

References: 
 >Crash when printing (including printing to PDF) (From: John Brownie <email@hidden>)
 >Re: Crash when printing (including printing to PDF) (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: NSOperation Efficiency
  • Next by Date: Localization of Help
  • Previous by thread: Re: Crash when printing (including printing to PDF)
  • Next by thread: Re: overriding a method with NSObject's version
  • Index(es):
    • Date
    • Thread