• 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: Drag & Drop on NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag & Drop on NSTableView


  • Subject: Re: Drag & Drop on NSTableView
  • From: Stephane Sudre <email@hidden>
  • Date: Thu, 22 Jan 2004 16:12:46 +0100

You get the image file type and extension using the NSFileManager API.

You get a list of suitable extension and file type:

@"JPG", @"JPEG", @"'JPEG'"

and you compare them with a no-case sensitive operation.

If you want to get a list of suitable extensions and file types for an image: NSImage -> + (NSArray *)imageFileTypes or its sibbling.

My $0.02

Le jeudi, 22 jan 2004, ` 15:21 Europe/Paris, Michael Becker a icrit :

Hi!

How can I make my NSTableView accept only JPEG-files? Right now I use NSFilenamesPboardType, which is good because I also want to be able to drop several files at once. But how can I restrict the acceptance to JPEG-only (image-only would be okay, too)?

Michael
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Drag & Drop on NSTableView (From: Michael Becker <email@hidden>)

  • Prev by Date: Re: who knows small (free) database for my cocoa project
  • Next by Date: Re: who knows small (free) database for my cocoa project
  • Previous by thread: Drag & Drop on NSTableView
  • Next by thread: Newbie question: Software Update
  • Index(es):
    • Date
    • Thread