Validating Image File Drag and Drops
Validating Image File Drag and Drops
- Subject: Validating Image File Drag and Drops
- From: Colin Cornaby <email@hidden>
- Date: Tue, 10 Apr 2007 18:58:53 -0700
I have a table view and I want to allow users to drag image files
into the table. Someone suggested that I could use UTI's to validate
that the file dragged onto my table view is an image file. I'm having
a few issues though. I can't find the methodology for validating a
file against a UTI. I know I could probably implement my own UTI
checker by getting the file extension of the file, and iterating
through all the file types and checking if any of them list that file
extension as one of their types. It seems to me there must be a
better way though. For one thing, this method wouldn't work for
validating files that use creator codes instead of extensions.
Has anyone used UTI's with drag and drop in Cocoa? Documentation is
sparse on the UTI API's, and even Google doesn't find much.
Thanks,
Colin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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