I'm having a problem setting paths in the GenericDirCtrl on OS X.
SetPath() works great for directories on the main hard drive of an OS X
computer, but if I need to select a directory from another drive, say a
connected network drive or an external USB drive, SetPath() selects the
Mac's main hard drive's root instead of the correct drive and path. I've
attached a simple sample. Basically, any path that starts with "/Volumes"
(in English) can't be selected programmatically. (I'm using OS X 10.5.8,
Python 2.6.6, and wxPython 2.8.12.1.)
It appears the GenericDirCtrl isn't properly handling the "/Volumes" prefix
the Mac uses for network and external drives.
First, has anyone already encountered and solved this problem, which might
save me a bit of work?
If not, then second, does anyone know how I can reliably determine what
prefix the localized computer will use for external drives? In English,
it's "/Volumes" and in Spanish, it's "/Volumnes", but I don't have
translations for all the languages my users will be using.
Thanks in advance for any assistance you can provide.
I'm having a problem setting paths in the GenericDirCtrl on OS X.
SetPath() works great for directories on the main hard drive
of an OS X computer, but if I need to select a directory from
another drive, say a connected network drive or an external
USB drive, SetPath() selects the Mac's main hard drive's root
instead of the correct drive and path. I've attached a
simple sample. Basically, any path that starts with
"/Volumes" (in English) can't be selected programmatically.
(I'm using OS X 10.5.8, Python 2.6.6, and wxPython 2.8.12.1.)
It appears the GenericDirCtrl isn't properly handling the
"/Volumes" prefix the Mac uses for network and external drives.
First, has anyone already encountered and solved this
problem, which might save me a bit of work?
If not, then second, does anyone know how I can reliably
determine what prefix the localized computer will use for
external drives? In English, it's "/Volumes" and in Spanish,
it's "/Volumnes", but I don't have translations for all the
languages my users will be using.
I have overcome the problem by substituting my own SetPath method. I've
attached the new code, in case anyone is interested.
Not that I know of, but in 2.9 the Volumes folder is shown in the tree so when setting it to a folder on a mounted drive it will be able to show it via that node in the tree.
···
On 1/6/12 11:51 AM, David Woods wrote:
I'm having a problem setting paths in the GenericDirCtrl on OS X.
SetPath() works great for directories on the main hard drive of an OS X
computer, but if I need to select a directory from another drive, say a
connected network drive or an external USB drive, SetPath() selects the
Mac's main hard drive's root instead of the correct drive and path. I've
attached a simple sample. Basically, any path that starts with "/Volumes"
(in English) can't be selected programmatically. (I'm using OS X 10.5.8,
Python 2.6.6, and wxPython 2.8.12.1.)
It appears the GenericDirCtrl isn't properly handling the "/Volumes" prefix
the Mac uses for network and external drives.
First, has anyone already encountered and solved this problem, which might
save me a bit of work?