[Mac, wx 2.8.1] file dialogs and OS-X packages

Stefan Csomor csomor at advancedconcepts.ch
Wed Jun 27 08:23:58 PDT 2007


Hi Yaron

> > 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.

very strange, I didn't get such a message and I was saving on an existing Pages document, but that one was having its extension hidden, now when I try with a Pages document that has its extension shown it behaves as you described, so I'd leave it on there as well

> 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.

but that would be the folders dialog, and I have not been able to pass options so that this behavior would work. I can have packages show their triangle, but it was impossible to have them behave as folders but not being 'Chooseable' as such. Using AllowOpenPackages without the SupportPackages didn't allow opening any of the packages, having both of them turned on, showed the behavior described...

now the other way round, eg wanting to be able to select Info.plist files, also here, as soon as you have OpenPackages true, there is no way selecting a package itself.

> >
> > 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.

I have already done it for testing the different behaviors, and I'll commit that part, but I still have only one flag that seems to be truly working - and for which I have also a Cocoa implementation ...

Best,

Stefan




More information about the wx-users mailing list