summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-01-17 23:13:03 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-01-17 23:13:03 (GMT)
commite58962af4de4ff3a331be66c4413d1609de40633 (patch)
tree573bf3ec7fe36398b69619f4a93e11c73559b227 /Lib/plat-mac
parentb2a57722a8ed9ba035707a50023105cdbfcfdaae (diff)
downloadcpython-e58962af4de4ff3a331be66c4413d1609de40633.zip
cpython-e58962af4de4ff3a331be66c4413d1609de40633.tar.gz
cpython-e58962af4de4ff3a331be66c4413d1609de40633.tar.bz2
Fixed the first two bugs in the new file dialogs (found by Just):
- AskFileForSave didn't work for string return values - filterProc didn't work.
Diffstat (limited to 'Lib/plat-mac')
-rw-r--r--Lib/plat-mac/EasyDialogs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/plat-mac/EasyDialogs.py b/Lib/plat-mac/EasyDialogs.py
index cb1ef99..25a791a 100644
--- a/Lib/plat-mac/EasyDialogs.py
+++ b/Lib/plat-mac/EasyDialogs.py
@@ -30,6 +30,7 @@ from Carbon.ControlAccessor import * # Also import Controls constants
import Carbon.File
import macfs
import macresource
+import os
_initialized = 0
@@ -660,7 +661,7 @@ def AskFileForSave(**args):
# This is gross, and probably incorrect too
vrefnum, dirid, name = rr.selection[0].as_tuple()
pardir_fss = Carbon.File.FSSpec((vrefnum, dirid, ''))
- pardir_fsr = Carbon.File.FSRef(fss)
+ pardir_fsr = Carbon.File.FSRef(pardir_fss)
pardir_path = pardir_fsr.FSRefMakePath() # This is utf-8
name_utf8 = unicode(name, 'macroman').encode('utf8')
fullpath = os.path.join(pardir_path, name_utf8)