• 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
-[NSAttributedString initWithPasteboard:...] vs. Dictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-[NSAttributedString initWithPasteboard:...] vs. Dictionary


  • Subject: -[NSAttributedString initWithPasteboard:...] vs. Dictionary
  • From: Jim Correia <email@hidden>
  • Date: Sun, 29 Jan 2006 09:56:20 -0500

If the Dictionary application is the source of the pasteboard (WebArchivePBoardType), -[NSAttributedString initWithPasteboard:options:documentAttributes:error:] does not return an error, but does return an attributed string of the form:

This page contains the following errors:
error on line 1 at column 95: Opening and ending tag mismatch: hr line 0 and td
Below is a rendering of the page up to the first error.


While I certainly believe it's conclusion that the HTML is incorrect, the end result isn't terribly useful in these circumstances. Is there a way to get an error back instead, so I can fall back to one of the other types on the pasteboard?

(I'd prefer not to have to match against that particular string due to localization issues and the possibility that the wording will change in future releases.)

Thanks,
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: -[NSAttributedString initWithPasteboard:...] vs. Dictionary
      • From: Jim Correia <email@hidden>
  • Prev by Date: Re: "Library" smart group in Core Data
  • Next by Date: Re: Album art from Mp3, AAC via QTKit question
  • Previous by thread: Help with subclassing NSTextField
  • Next by thread: Re: -[NSAttributedString initWithPasteboard:...] vs. Dictionary
  • Index(es):
    • Date
    • Thread