• 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: Can I put UTIs in NSFilesPromisePboardType promise drag array?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I put UTIs in NSFilesPromisePboardType promise drag array?


  • Subject: Re: Can I put UTIs in NSFilesPromisePboardType promise drag array?
  • From: Jim Correia <email@hidden>
  • Date: Sat, 4 Oct 2008 23:31:06 -0400

On Oct 4, 2008, at 10:45 PM, Nathan Vander Wilt wrote:

HFS types seem to be well deprecated in nearly every other area, the drag destination guides don't encourage checking the types anyway

Can you post a reference?

You generally should check the type in the drag, and not offer to accept a drag which you can't accept.

and the API itself doesn't facilitate easy checking especially given the fact that strings already are *either* extensions or legacy type codes with no programmatic distinction.

Due to the convention for how HFS types are encoding, it is possible to programatically distinguish the two, if you need to do so.


Plus who really wants to keep comparing strings (eg 'txt' vs. 'TXT' vs. 'TEXT' times every other supported format) when they could be using UTTypeConformsTo instead? :-)

Nobody really wants to keep supporting legacy standards when there are new better ones. However, if you want to interoperate with stuff which uses those legacy standards, you have to.


Until such time as NSPasteboard does implicit translation of UTIs put in NSFilesPromisePboardType, any client only expecting to see traditional types might fail. Only you can decide if you need to interoperate with such clients.

As it turns outs, I've hedged my bets. I conservatively only put traditional types when writing NSFilesPromisePboardType, but correctly handle UTIs when receiving the drag. I don't know how many other clients are as flexible.

- Jim
_______________________________________________

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


  • Follow-Ups:
    • Re: Can I put UTIs in NSFilesPromisePboardType promise drag array?
      • From: Nathan Vander Wilt <email@hidden>
References: 
 >Can I put UTIs in NSFilesPromisePboardType promise drag array? (From: Nathan Vander Wilt <email@hidden>)
 >Re: Can I put UTIs in NSFilesPromisePboardType promise drag array? (From: Nathan Vander Wilt <email@hidden>)

  • Prev by Date: Re: Memory Leak in XIB file?
  • Next by Date: Re: premature dealloc of the datasource of a NSTableView crashes my application
  • Previous by thread: Re: Can I put UTIs in NSFilesPromisePboardType promise drag array?
  • Next by thread: Re: Can I put UTIs in NSFilesPromisePboardType promise drag array?
  • Index(es):
    • Date
    • Thread