From: Phil E. <ph...@li...> - 2002-08-22 22:30:09
|
On Thursday 15 August 2002 02:46 am, you wrote: > Did you mean to reply to the list instead? Anyway, many of the samples > create config files and/or use data files so they have a similar problem to > the resourceEditor issue you had. > Yes, I did. What can I say - it was late, my wife and I had consumed a whole bottle of Portugese rose between us after dinner...you get the picture :-) > On the wxDirDialog issue, are you wanting to use directoryDialog in > PythonCard? If so it is simple to use, though I just realized Dan made a > mistake in his docs at: > > http://pythoncard.sourceforge.net/dialogs/directorydialog.html > > The proper way to call it is > > result = dialog.directoryDialog(self, 'a message', 'path') > > where 'path' is the starting directory you want, if any. See the dialogs > sample. > For the benefit of list subscribers, I made the following comment in the message I inadvertently mailed direct to Kevin: """ The only problems I've come across so far have been wxPython/wxWindows related, rather than PythonCard related. As an example, wxDirDialog really *sucks* (just what is the directory section 'Variables' supposed to represent?) on a Linux box, but works just fine on Windows - when I get a chance, maybe I'll try to put a custom PythonCard dialog together using wxTree and a few buttons that works a bit more smoothly on a *NIX machine. """ Here's the code in my app which uses directoryDialog: def on_DirButton_mouseClick(self, event): if self.components.BaseDir.text != '': start = self.components.BaseDir.text else: start = '/home/phile/pictures/' result = dialog.directoryDialog(self, 'Choose image directory', start) if result['accepted']: # get a list of .jpg files in the current directory blah, blah, blah... When I run the app and click on 'DirButton', the first thing that pops up is a dialog box saying "Can not enumerate files in directory '//.gconfd' (error 13: Permission denied)". This dialog has 2 buttons; "OK" and "Details >>". I click "OK" to clear the message, and the tree-style representation of my machines directory structure that it gives me is (IMHO) a bit bizarre - hope my ASCII art is good enough to get this across: [-] -- Sections | +--[+] -- The Computer | +--[+] -- My Home | +--[+] -- Mounted Devices | +--[+] -- User Local | +--[+] -- User | +--[+] -- Variables | +--[+] -- Etcetera | +--[+] -- Temporary I'd much rather that: a. The 'permission denied' error was silently ignored. b. The directory tree looked a bit more like a real filesystem. Now, I know that this isn't due to anything in PythonCard, since the wxPython demo program does pretty much the same thing, and even coding a native wxDirDialog into my app produces the same result. Although I've looked around the 'net, there don't seem to be any other Linux users that are unhappy with this state of affairs, so it must be just me being picky! For the record, my system is running Mandrake 8.2, with Python2.2, wxPython-2.3.2.1 and wxGTK-2.3.2 all installed the lazy way, i.e. from RPM's. I'm about to dive into adding a 'preferences' window to my program followed by porting it to run under Windows as well as Linux, so with a bit of luck I'll have something available for download from my website soon so people can take a look. -- Regards Phil Edwards ========================================================================== Brighton, Sussex http://www.linux2000.com United Kingdom mailto:ph...@li... ========================================================================== |