[Mac, wx 2.8.1] file dialogs and OS-X packages
Yaron Tadmor
YaronT at HumanEyes.com
Wed Jun 27 01:15:23 PDT 2007
>
> you mean a method to indicate 'treat packages as folders' as a
instance
> method on a dialog or as a static method. The problem with instance
> methods would be that the one-liners like wxFileSelector (although if
you
> pass all params this won't fit onto one line;-) wouldn't be supported,
> therefore I'd slightly lean towards a wxFD_MAC_ALLOW_OPEN_PACKAGES or
> something
I think such a flag is blessed.
>
> kNavSupportPackages IMHO should always be on, because it allows the
> selection of a package as if it were a file, behavior does not change
when
> it is set in the 'save' case, unless the AllowOpenPackages is used, so
> I'll turn that on for all cases
That's not 100% correct.
On save dialog the kNavSupportPackages has a difference. If you select a
package and hit the "save" button and this flag is off, you get the "you
can't select a folder" message. If it's on you get the (expected) "the
file already exists Replace/Cancel" message.
On open dialog WX currently only turns on kNavSupportPackages and the
dialog works excellent. It allows me to select package as files for
opening.
I'm not sure turning it on for all cases is the write thing. It depends
on it's interaction with kNavAllowOpenPackages.
I can assume it makes sense usually, but I can think of cases where you
won't want that.
Say I want the user to select a folder for something. But say I don't
want him to select package folders (all though sub-folders inside
packages are OK), I'd turn on the allowOpen flag and not the
supportPackages flag.
>
> kNavAllowOpenPackages now this allows to descend into a package, by
> default this should not be used, but if someone knows that they want
to
> get into the internals of something, they can turn this on
>
I think the 2 flags have different meaning and should be treated
differently in WX. I do think, thought, that using the proper default is
important.
Also, I would like to know if you'll be doing this, so I know not to do
it and submit a patch.
Yaron
More information about the wx-users
mailing list