Re: Customizing the file browser in and NSOpenPanel
Re: Customizing the file browser in and NSOpenPanel
- Subject: Re: Customizing the file browser in and NSOpenPanel
- From: "I. Savant" <email@hidden>
- Date: Wed, 22 Aug 2007 11:06:19 -0400
On 8/22/07, Gerald Miller <email@hidden> wrote:
> Is it possible to customize the behavior of the file browser in an open panel? My application works with projects that consist of folders containing files and subfolders that can define one or more logical projects. When the user selects a project directory, I'd like to display (and allow the user to select) the logical project names, instead of the the files and folders that exist in that directory on disk. I also need to give the user the option of selecting a single file, so a folder chooser is not an option. Has anyone done anything like this, or know if it's possible?
... it sounds to me like you're not trying to browse for files,
then. So why not just create your own sheet which lists your available
project names? Modifying such a basic (and common) UI mechanism as an
open panel is often a poor design choice and, in this case, is not
really possible without using undocumented APIs.
Listing files in a folder is trivial (with NSFileManager) and so is
getting that data into a list, so it'd take you *far* less work to get
the custom behavior you're looking for by simply creating your own
"browser".
--
I.S.
_______________________________________________
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