Solution not found in the cocoabuilder archive.

Problem:
--------

I have a list of files and folders.

I can add items to this list through a standard NSOpenPanel dialog.

When a folder is already in the list, I want to prevent the user from selecting it from the NSOpenPanel dialog.

I can do this with:

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

The problem is that this prevents the user from selecting a file within this folder from the NSOpenDialog.

Question:
---------

Is there a way to prevent a folder from being selected but still allow a file within this folder to be selected?



I could use - (BOOL)panel:(id)sender isValidFilename:(NSString *) filename; and always allow to select the folder but I want the user to know that the folder can not be selected and not just discover this when the Open button gets clicked.


_______________________________________________

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