• 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: NSOpenPanel & NSFileTypeForHFSTypeCode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOpenPanel & NSFileTypeForHFSTypeCode


  • Subject: Re: NSOpenPanel & NSFileTypeForHFSTypeCode
  • From: Chris Heimark <email@hidden>
  • Date: Wed, 10 Oct 2007 17:18:15 -0400


On Oct 10, 2007, at 4:52 PM, John Stiles wrote:



You probably don't want to go down this route.

And is it possible to use setFileTypes to only allow the selection of a volume?

Is the implication of this statement that there are NO fileType symbols that would narrow the scope of the selectable files? I presume answer is YES.


Yes. You will want to implement:

- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename;

and return "NO" for non-volumes (you have to determine that by whatever logic you want). This disables everything else.

You also probably want to preseed the directory to root with: setDirectory:@"/Volumes", and/or call beginForDirectory:@"/ Volumes" -- unfortunately, /Volumes is slightly different than the 'computer' node.

Will this technique show the boot volume (rooted at /)?


I am going to qualify the list of usable volumes for my application using NSTask running diskutil and filtering ONLY for the volumes I want - which in my case are USB mounted flash drives. So I may just end up with a NSPopupButton selector filled with only qualified volumes. So '/' will not be one of them...

This appears to be my only alternative ... unless a future OS brings a solution ... which I'll know about soon enough ;-)


_______________________________________________

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: NSOpenPanel & NSFileTypeForHFSTypeCode
      • From: Steve Checkoway <email@hidden>
    • Re: NSOpenPanel & NSFileTypeForHFSTypeCode
      • From: Corbin Dunn <email@hidden>
    • Re: NSOpenPanel & NSFileTypeForHFSTypeCode
      • From: "Sean McBride" <email@hidden>
References: 
 >NSOpenPanel & NSFileTypeForHFSTypeCode (From: Chris Heimark <email@hidden>)
 >Re: NSOpenPanel & NSFileTypeForHFSTypeCode (From: Corbin Dunn <email@hidden>)
 >Re: NSOpenPanel & NSFileTypeForHFSTypeCode (From: John Stiles <email@hidden>)

  • Prev by Date: Re: NSOpenPanel & NSFileTypeForHFSTypeCode
  • Next by Date: Re: Wanted: Cocoa Programmers
  • Previous by thread: Re: NSOpenPanel & NSFileTypeForHFSTypeCode
  • Next by thread: Re: NSOpenPanel & NSFileTypeForHFSTypeCode
  • Index(es):
    • Date
    • Thread