I’m learning to write Mac programs and am looking at the Path Control object. I need to restrict its selections to only directories and not files.
Is there a way to do this? Is there a special keyword to put in the Legal Types box that means “directories”? I tried “Folder” and “Directory” but they don’t work.
Thanks,
Scott
I haven’t actually tried this, but it seems like you might be able to call
-[NSPathCell setAllowedTypes:], specifying public.folder as the only allowed UTI.In response to a comment asking for more detail on where it is supposed to go: If you have an outlet to an
NSPathControl, you could set this programmatically like so: