Re: Validating Image File Drag and Drops
Re: Validating Image File Drag and Drops
- Subject: Re: Validating Image File Drag and Drops
- From: Scott Anguish <email@hidden>
- Date: Tue, 10 Apr 2007 22:06:33 -0400
On Apr 10, 2007, at 9:58 PM, Colin Cornaby wrote:
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.
have a look at this
http://developer.apple.com/documentation/Carbon/Conceptual/understanding_utis/index.html?http://developer.apple.com/documentation/Carbon/Conceptual/understanding_utis/understand_utis_conc/chapter_2_section_3.html#/
/apple_ref/doc/uid/TP40001319-CH202-DontLinkElementID_12
specifically the getting a type from a file extension and the conforms
to routines.
_______________________________________________
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