summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/tkMacOSXDialog.c7
-rw-r--r--tests/font.test1
2 files changed, 6 insertions, 2 deletions
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index 67f17be..0f7ef3a 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -395,10 +395,12 @@ Tk_GetOpenFileObjCmd(
NSMutableArray *fileTypes = nil;
NSOpenPanel *panel = [NSOpenPanel openPanel];
NSInteger modalReturnCode = modalError;
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
+ BOOL parentIsKey = NO;
+#endif
TkInitFileFilters(&fl);
for (i = 1; i < objc; i += 2) {
- BOOL parentIsKey = NO;
if (Tcl_GetIndexFromObjStruct(interp, objv[i], openOptionStrings,
sizeof(char *), "option", TCL_EXACT, &index) != TCL_OK) {
goto end;
@@ -598,10 +600,11 @@ Tk_GetSaveFileObjCmd(
NSMutableArray *fileTypes = nil;
NSSavePanel *panel = [NSSavePanel savePanel];
NSInteger modalReturnCode = modalError;
+ BOOL parentIsKey = NO;
TkInitFileFilters(&fl);
for (i = 1; i < objc; i += 2) {
- BOOL parentIsKey = NO;
+ parentIsKey = NO;
if (Tcl_GetIndexFromObjStruct(interp, objv[i], saveOptionStrings,
sizeof(char *), "option", TCL_EXACT, &index) != TCL_OK) {
goto end;
diff --git a/tests/font.test b/tests/font.test
index 9ed24dc..2defb29 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -1162,6 +1162,7 @@ test font-33.1 {Tk_TextWidth procedure} {
test font-34.1 {ConfigAttributesObj procedure: arguments} {
# (Tcl_GetIndexFromObj() != TCL_OK)
+ set x {}
setup
list [catch {font create xyz -xyz} msg] $msg
} {1 {bad option "-xyz": must be -family, -size, -weight, -slant, -underline, or -overstrike}}