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

Matt Connolly matt at soundevolution.com.au
Wed Jun 27 00:22:39 PDT 2007


I agree.

There are two behaviours:

1. support packages. This is for files like ".rtfd" which appear to  
the user as a single file even though they are folders = packages.

2. allow open pages. This is for a program that would be interested  
in opening some thing like an "Info.plist" file which would be found  
inside a package, but for opening standard files.

PS: in the interest of writing cross platform applications, I can't  
think of an example where a document would be used as a package,  
since that document would only work on mac os x.

PPS: but, if the users wx application was interested in having the  
user select an application to launch, you'd want the user to select a  
".app" package, so you definitely want to have the ability to support  
packages on mac os x.

-matt


On 27/06/2007, at 6:15 PM, Yaron Tadmor wrote:

>
>>
>> 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
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2174 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wx-users/attachments/20070627/031c87b6/smime.bin


More information about the wx-users mailing list