filenames grayed out?

(Coming back to wx and Python after years away!)

My wxFileDialog for opening a file used to work. While debugging (in
Wing), I find that the filenames are all grayed out (except
directories). My wildcard is "*.*". What am I forgetting, or what
did I miss?

What platform and version? Also, MakingSampleApps - wxPyWiki

···

On 2/29/12 9:36 AM, Charles Hartman wrote:

(Coming back to wx and Python after years away!)

My wxFileDialog for opening a file used to work. While debugging (in
Wing), I find that the filenames are all grayed out (except
directories). My wildcard is "*.*". What am I forgetting, or what
did I miss?

--
Robin Dunn
Software Craftsman

Sorry, yes: Mac OS 10.7.8. Python 2.7.2 (64/32-bit). wxPython 2.9.3.1
cocoa (why are they calling it "classic"?)

If I hardwire wildcard="*.*" into the constructor call, it works. But
this standard code

        wildcard = 'All files (*.*) | *.*'
        if not self.loaddir: defDir = os.getcwd()
        else: defDir = self.loaddir
        dlg = wx.FileDialog(self, message="Choose a plain text file",
                defaultDir=defDir, defaultFile="",
                wildcard=wildcard, style=wx.OPEN | wx.CHANGE_DIR)

gives me the grayed-out filenames.

I'm sure I'm forgetting something basic and/or simple.

···

On Feb 29, 2:00 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 2/29/12 9:36 AM, Charles Hartman wrote:

> (Coming back to wx and Python after years away!)

> My wxFileDialog for opening a file used to work. While debugging (in
> Wing), I find that the filenames are all grayed out (except
> directories). My wildcard is "*.*". What am I forgetting, or what
> did I miss?

What platform and version? Also,MakingSampleApps - wxPyWiki

--
Robin Dunn
Software Craftsmanhttp://wxPython.org

Charles Hartman wrote:

Sorry, yes: Mac OS 10.7.8. Python 2.7.2 (64/32-bit). wxPython 2.9.3.1
cocoa (why are they calling it "classic"?)

If I hardwire wildcard="*.*" into the constructor call, it works. But
this standard code

        wildcard = 'All files (*.*) | *.*'

You have extra spaces in there. It may be looking literally for a
filename that begins with a blank. Try:
    wildcard = 'All files (*.*)|*.*'
You might also try skipping the dot:
    wildcard = 'All files (*.*)|*'

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Many thanks. (What's odd is that a while back that line *did* work.
But I'm hardly surprised that updating old code should turn up
quirks.

Charles Hartman

···

On Feb 29, 5:32 pm, Tim Roberts <t...@probo.com> wrote:

Charles Hartman wrote:
> Sorry, yes: Mac OS 10.7.8. Python 2.7.2 (64/32-bit). wxPython 2.9.3.1
> cocoa (why are they calling it "classic"?)

> If I hardwire wildcard="*.*" into the constructor call, it works. But
> this standard code

> wildcard = 'All files (*.*) | *.*'

You have extra spaces in there. It may be looking literally for a
filename that begins with a blank. Try:
wildcard = 'All files (*.*)|*.*'
You might also try skipping the dot:
wildcard = 'All files (*.*)|*'

--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.