On Aug 23, 2008, at 11:07 PM, Angelo Chen wrote:

Hi,

I use following code to select a volume, it works, but it also give the user chance to select directory as well, how to disable selection of directories, only allow volumes?
thanks,


NSOpenPanel *oPanel = [OpenPanel openPanel];
[oPanel setCanChooseFiles:NO];
[oPanel setCanChooseDirectories:YES];
[oPanel setCanCreateDirectories:NO];


Use:

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

To disable things that aren't volumes.

corbin
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to