From 77587d48dfa24f29cf65de67ac0abc7f8baa86cd Mon Sep 17 00:00:00 2001 From: Kevin Walzer Date: Fri, 9 Aug 2019 12:19:28 +0000 Subject: Tweak display of spinboxes on macOS; thanks to Christopher Chavez for patch --- generic/tkEntry.c | 24 ++++++++++-------------- macosx/tkMacOSXEntry.c | 23 ++++++++++++----------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/generic/tkEntry.c b/generic/tkEntry.c index a7bc5a0..0dfacd7 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -1513,17 +1513,15 @@ EntryWorldChanged( * * TkpDrawEntryBorderAndFocus -- * - * This function redraws the border of an entry widget. It overrides the - * generic border drawing code if the entry widget parameters are such - * that the native widget drawing is a good fit. This version just - * returns 0, so platforms that don't do special native drawing don't - * have to implement it. + * Stub function for Tk on platforms other than Aqua + * (Windows and X11), which do not draw native entry borders. + * See macosx/tkMacOSXEntry.c for function definition in Tk Aqua. * * Results: - * 1 if it has drawn the border, 0 if not. + * Returns 0. * * Side effects: - * May draw the entry border into pixmap. + * None. * *-------------------------------------------------------------- */ @@ -1542,17 +1540,15 @@ TkpDrawEntryBorderAndFocus( * * TkpDrawSpinboxButtons -- * - * This function redraws the buttons of an spinbox widget. It overrides - * the generic button drawing code if the spinbox widget parameters are - * such that the native widget drawing is a good fit. This version just - * returns 0, so platforms that don't do special native drawing don't - * have to implement it. + * Stub function for Tk on platforms other than Aqua + * (Windows and X11), which do not draw native spinbox buttons. + * See macosx/tkMacOSXEntry.c for function definition in Tk Aqua. * * Results: - * 1 if it has drawn the border, 0 if not. + * Returns 0. * * Side effects: - * May draw the entry border into pixmap. + * None. * *-------------------------------------------------------------- */ diff --git a/macosx/tkMacOSXEntry.c b/macosx/tkMacOSXEntry.c index a1c5d60..7915f6f 100644 --- a/macosx/tkMacOSXEntry.c +++ b/macosx/tkMacOSXEntry.c @@ -124,16 +124,17 @@ TkpDrawEntryBorderAndFocus( int incDecWidth; /* - * Temporarily change the width of the widget so that the same code can - * be used for drawing the Entry portion of the Spinbox as is used to - * draw an ordinary Entry. The width must be restored before - * returning. + * If native spinbox buttons are going to be drawn, then temporarily + * change the width of the widget so that the same code can be used + * for drawing the Entry portion of the Spinbox as is used to draw + * an ordinary Entry. The width must be restored before returning. */ oldWidth = Tk_Width(tkwin); - ComputeIncDecParameters(Tk_Height(tkwin) - 2 * MAC_OSX_FOCUS_WIDTH, - &incDecWidth); - Tk_Width(tkwin) -= incDecWidth + 1; + if (ComputeIncDecParameters(Tk_Height(tkwin) - 2 * MAC_OSX_FOCUS_WIDTH, + &incDecWidth) != 0) { + Tk_Width(tkwin) -= incDecWidth + 1; + } } /* @@ -186,10 +187,10 @@ TkpDrawEntryBorderAndFocus( * have to implement it. * * Results: - * 1 if it has drawn the border, 0 if not. + * 1 if it has drawn the buttons, 0 if not. * * Side effects: - * May draw the entry border into pixmap. + * May draw the buttons into pixmap. * *-------------------------------------------------------------- */ @@ -258,9 +259,9 @@ TkpDrawSpinboxButtons( */ bgGC = Tk_GCForColor(sbPtr->entry.highlightBgColorPtr, d); - rects[0].x = bounds.origin.x; + rects[0].x = Tk_Width(tkwin) - incDecWidth - 1; rects[0].y = 0; - rects[0].width = Tk_Width(tkwin); + rects[0].width = incDecWidth + 1; rects[0].height = Tk_Height(tkwin); XFillRectangles(Tk_Display(tkwin), d, bgGC, rects, 1); -- cgit v0.12 From 4ebe61f87e43bc4477641121cdd51a52b70dd775 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 11 Aug 2019 18:11:18 +0000 Subject: Fix typo in a comment in tkWinFont.c. Thanks to C. Chavez --- win/tkWinFont.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 63ddff4..ad7738f 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -2178,7 +2178,7 @@ FontMapInsert( * None. * * Side effects: - * Mempry allocated. + * Memory allocated. * *------------------------------------------------------------------------- */ -- cgit v0.12 From 6e359bd331f0d8c53f8c10cebc13784f866b6968 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 13 Aug 2019 07:32:07 +0000 Subject: Use "unsigned long" as type for "mask" variables containing X11 button-masks consistantly. Code cleanup. --- generic/tkCanvas.c | 4 ++-- generic/tkEvent.c | 2 +- generic/tkInt.h | 2 +- generic/tkTextTag.c | 2 +- generic/ttk/ttkTreeview.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index ab648a1..5b4d19b 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -1027,7 +1027,7 @@ CanvasWidgetCmd( result = TCL_ERROR; goto done; } - if (mask & (unsigned) ~(ButtonMotionMask|Button1MotionMask + if (mask & ~(unsigned long)(ButtonMotionMask|Button1MotionMask |Button2MotionMask|Button3MotionMask|Button4MotionMask |Button5MotionMask|ButtonPressMask|ButtonReleaseMask |EnterWindowMask|LeaveWindowMask|KeyPressMask @@ -4747,7 +4747,7 @@ CanvasBindProc( XEvent *eventPtr) /* Pointer to X event that just happened. */ { TkCanvas *canvasPtr = clientData; - int mask; + unsigned long mask; Tcl_Preserve(canvasPtr); diff --git a/generic/tkEvent.c b/generic/tkEvent.c index 753a31b..f5ef1f8 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -540,7 +540,7 @@ static const int buttonMasks[] = { 0, Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask }; -int +unsigned long TkGetButtonMask( unsigned int button) { diff --git a/generic/tkInt.h b/generic/tkInt.h index 124a8f5..a4f2be4 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -940,7 +940,7 @@ typedef struct TkpClipMask { (Button1Mask|Button2Mask|Button3Mask|Button4Mask|Button5Mask) -MODULE_SCOPE int TkGetButtonMask(unsigned int); +MODULE_SCOPE unsigned long TkGetButtonMask(unsigned int); /* * Object types not declared in tkObj.c need to be mentioned here so they can diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index 5cb08ec..6fa115d 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -292,7 +292,7 @@ TkTextTagCmd( if (mask == 0) { return TCL_ERROR; } - if (mask & (unsigned) ~(ButtonMotionMask|Button1MotionMask + if (mask & ~(unsigned long)(ButtonMotionMask|Button1MotionMask |Button2MotionMask|Button3MotionMask|Button4MotionMask |Button5MotionMask|ButtonPressMask|ButtonReleaseMask |EnterWindowMask|LeaveWindowMask|KeyPressMask diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index cda98a0..3674ae5 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -923,7 +923,7 @@ static void DragColumn(Treeview *tv, int i, int delta) static TreeItem *IdentifyItem(Treeview *tv, int y); /*forward*/ -static const unsigned int TreeviewBindEventMask = +static const unsigned long TreeviewBindEventMask = KeyPressMask|KeyReleaseMask | ButtonPressMask|ButtonReleaseMask | PointerMotionMask|ButtonMotionMask -- cgit v0.12 From bef7988898bd03e82851459cd2b320a1ceb7c4ef Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 13 Aug 2019 08:33:53 +0000 Subject: Fix indenting in bind.test (taken from TIP #532 branch) --- tests/bind.test | 811 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 406 insertions(+), 405 deletions(-) diff --git a/tests/bind.test b/tests/bind.test index 981ba32..9cbc15b 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -22,7 +22,7 @@ foreach event [bind Test] { bind Test $event {} } foreach event [bind all] { - bind all $event {} + bind all $event {} } proc unsetBindings {} { @@ -90,10 +90,10 @@ test bind-1.7 {bind command} -body { } -result {test script more text} test bind-1.8 {bind command} -body { - bind .t {test script} + bind .t {test script} } -returnCodes error -result {bad event type or keysym "gorp"} test bind-1.9 {bind command} -body { - catch {bind .t {test script}} + catch {bind .t {test script}} bind .t } -result {} test bind-1.10 {bind command} -body { @@ -154,10 +154,10 @@ test bind-2.8 {bindtags command} -body { test bind-2.9 {bindtags command} -body { frame .t.f bindtags .t.f {a b c} - bindtags .t.f "\{" + bindtags .t.f "\{" } -cleanup { destroy .t.f -} -returnCodes error -result {unmatched open brace in list} +} -returnCodes error -result {unmatched open brace in list} test bind-2.10 {bindtags command} -body { frame .t.f bindtags .t.f {a b c} @@ -169,10 +169,10 @@ test bind-2.10 {bindtags command} -body { test bind-2.11 {bindtags command} -body { frame .t.f bindtags .t.f {a b c} - bindtags .t.f "a .gorp b" + bindtags .t.f "a .gorp b" } -cleanup { destroy .t.f -} -returnCodes ok +} -returnCodes ok test bind-2.12 {bindtags command} -body { frame .t.f bindtags .t.f {a b c} @@ -212,7 +212,7 @@ test bind-4.1 {TkBindEventProc procedure} -setup { bind {a b} {lappend x "%W enter {a b}"} bind .t {lappend x "%W enter .t"} bind .t.f {lappend x "%W enter .t.f"} - + event generate .t.f return $x } -cleanup { @@ -232,9 +232,9 @@ test bind-4.2 {TkBindEventProc procedure} -setup { bind {a b} {lappend x "%W enter {a b}"} bind .t {lappend x "%W enter .t"} bind .t.f {lappend x "%W enter .t.f"} - + bindtags .t.f {.t.f {a b} xyz} - event generate .t.f + event generate .t.f return $x } -cleanup { destroy .t.f @@ -248,7 +248,7 @@ test bind-4.3 {TkBindEventProc procedure} -body { bind xyz {lappend x "%W enter xyz"} bind {a b} {lappend x "%W enter {a b}"} bind .t {lappend x "%W enter .t"} - + event generate .t return $x } -cleanup { @@ -268,7 +268,7 @@ test bind-4.4 {TkBindEventProc procedure} -setup { bind xyz {lappend x "%W enter xyz"} bind {a b} {lappend x "%W enter {a b}"} bind .t {lappend x "%W enter .t"} - + bindtags .t.f {.t.f .t.f2 .t.f3} bind .t.f {lappend x "%W enter .t.f"} bind .t.f3 {lappend x "%W enter .t.f3"} @@ -292,7 +292,7 @@ test bind-4.5 {TkBindEventProc procedure} -setup { bind {a b} {lappend x "%W enter {a b}"} bind .t {lappend x "%W enter .t"} bindtags .t.f {a b c d e f g h i j k l m n o p q r s t u v w x y z} - + event generate .t.f } -cleanup { destroy .t.f @@ -355,11 +355,11 @@ test bind-9.2 {Tk_DeleteBinding procedure} -setup { } -body { frame .t.f -class Test -width 150 -height 100 foreach i {a b c d} { - bind .t.f $i "binding for $i" + bind .t.f $i "binding for $i" } foreach i {b d a c} { - bind .t.f $i {} - lappend result [lsort [bind .t.f]] + bind .t.f $i {} + lappend result [lsort [bind .t.f]] } return $result } -cleanup { @@ -370,11 +370,11 @@ test bind-9.3 {Tk_DeleteBinding procedure} -setup { } -body { frame .t.f -class Test -width 150 -height 100 foreach i {<1> } { - bind .t.f $i "binding for $i" + bind .t.f $i "binding for $i" } foreach i { <1> } { - bind .t.f $i {} - lappend result [lsort [bind .t.f]] + bind .t.f $i {} + lappend result [lsort [bind .t.f]] } return $result } -cleanup { @@ -396,27 +396,27 @@ test bind-10.2 {Tk_GetBinding procedure} -body { } -result {Test} test bind-11.1 {Tk_GetAllBindings procedure} -body { - frame .t.f + frame .t.f foreach i "! a \\\{ ~ <> " { - bind .t.f $i Test + bind .t.f $i Test } lsort [bind .t.f] } -cleanup { destroy .t.f } -result {! <> a \{ ~} test bind-11.2 {Tk_GetAllBindings procedure} -body { - frame .t.f + frame .t.f foreach i " <1>" { - bind .t.f $i Test + bind .t.f $i Test } lsort [bind .t.f] } -cleanup { destroy .t.f } -result { } test bind-11.3 {Tk_GetAllBindings procedure} -body { - frame .t.f + frame .t.f foreach i " abcd ab" { - bind .t.f $i Test + bind .t.f $i Test } lsort [bind .t.f] } -cleanup { @@ -431,7 +431,7 @@ test bind-12.1 {Tk_DeleteAllBindings procedure} -body { test bind-12.2 {Tk_DeleteAllBindings procedure} -body { frame .t.f -class Test -width 150 -height 100 foreach i "a b c " { - bind .t.f $i x + bind .t.f $i x } destroy .t.f } -result {} @@ -448,7 +448,7 @@ test bind-13.1 {Tk_BindEvent procedure} -setup { bind Test : {lappend x "%W %K Test :"} bind all _ {lappend x "%W %K all _"} bind .t.f : {lappend x "%W %K .t.f :"} - + event generate .t.f event generate .t.f event generate .t.f @@ -471,7 +471,7 @@ test bind-13.2 {Tk_BindEvent procedure} -setup { bind Test {lappend x "%W %K Test press any"; break} bind all {continue; lappend x "%W %K all press any"} bind .t.f : {lappend x "%W %K .t.f pressed colon"} - + event generate .t.f return $x } -cleanup { @@ -527,11 +527,11 @@ test bind-13.5 {Tk_BindEvent procedure} -body { frame .t.g -gorp foo } -cleanup { bind all {} -} -returnCodes error -result {unknown option "-gorp"} +} -returnCodes error -result {unknown option "-gorp"} test bind-13.6 {Tk_BindEvent procedure} -body { bind all {lappend x "%W destroyed"} set x {} - catch {frame .t.g -gorp foo} + catch {frame .t.g -gorp foo} return $x } -cleanup { bind all {} @@ -612,10 +612,10 @@ test bind-13.11 {Tk_BindEvent procedure: collapse Motions} -setup { set x {} } -body { bind .t.f "lappend x Motion%#(%x,%y)" - event generate .t.f -serial 100 -x 100 -y 200 -when tail + event generate .t.f -serial 100 -x 100 -y 200 -when tail update event generate .t.f -serial 101 -x 200 -y 300 -when tail - event generate .t.f -serial 102 -x 300 -y 400 -when tail + event generate .t.f -serial 102 -x 300 -y 400 -when tail update return $x } -cleanup { @@ -629,10 +629,10 @@ test bind-13.12 {Tk_BindEvent procedure: collapse repeating modifiers} -setup { } -body { bind .t.f "lappend x %K%#" bind .t.f "lappend x %K%#" - event generate .t.f -serial 100 -when tail - event generate .t.f -serial 101 -when tail - event generate .t.f -serial 102 -when tail - event generate .t.f -serial 103 -when tail + event generate .t.f -serial 100 -when tail + event generate .t.f -serial 101 -when tail + event generate .t.f -serial 102 -when tail + event generate .t.f -serial 103 -when tail update } -cleanup { destroy .t.f @@ -868,7 +868,7 @@ test bind-13.27 {Tk_BindEvent procedure: no detail virtual pattern list} -setup set x {} } -body { bind .t.f {set x Button-2} - event generate .t.f + event generate .t.f return $x } -cleanup { destroy .t.f @@ -948,7 +948,7 @@ test bind-13.33 {Tk_BindEvent procedure: many C bindings cause realloc} -setup { set x {} } -body { bindtags .t.f {a b c d e f g h i j k l m n o p} - foreach p [bindtags .t.f] { + foreach p [bindtags .t.f] { bind $p <1> "lappend x $p" } event generate .t.f <1> @@ -1032,7 +1032,7 @@ test bind-13.43 {Tk_BindEvent procedure: break in script} -setup { } -result {b1} test bind-13.45 {Tk_BindEvent procedure: error in script} -setup { proc bgerror msg { - global x + global x lappend x $msg } frame .t.f -class Test -width 150 -height 100 @@ -1221,7 +1221,7 @@ test bind-15.11 {MatchPatterns procedure, modifier checks} -setup { } -cleanup { destroy .t.f } -result {0} -test bind-15.12 {MatchPatterns procedure, ignore modifier presses and releases} -constraints { +test bind-15.12 {MatchPatterns procedure, ignore modifier presses and releases} -constraints { nonPortable } -setup { frame .t.f -class Test -width 150 -height 100 @@ -1262,7 +1262,7 @@ test bind-15.14 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f {set x 1} set x 0 - event generate .t.f + event generate .t.f event generate .t.f event generate .t.f -x 30 -y 40 event generate .t.f -x 31 -y 39 @@ -1279,7 +1279,7 @@ test bind-15.15 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f {set x 1} set x 0 - event generate .t.f + event generate .t.f event generate .t.f event generate .t.f -x 30 -y 40 event generate .t.f -x 29 -y 41 @@ -1296,7 +1296,7 @@ test bind-15.16 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f {set x 1} set x 0 - event generate .t.f + event generate .t.f event generate .t.f event generate .t.f -x 30 -y 40 event generate .t.f -x 40 -y 40 @@ -1313,7 +1313,7 @@ test bind-15.17 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f {set x 1} set x 0 - event generate .t.f + event generate .t.f event generate .t.f event generate .t.f -x 30 -y 40 event generate .t.f -x 20 -y 40 @@ -1330,7 +1330,7 @@ test bind-15.18 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f {set x 1} set x 0 - event generate .t.f + event generate .t.f event generate .t.f event generate .t.f -x 30 -y 40 event generate .t.f -x 30 -y 30 @@ -1347,7 +1347,7 @@ test bind-15.19 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f {set x 1} set x 0 - event generate .t.f + event generate .t.f event generate .t.f event generate .t.f -x 30 -y 40 event generate .t.f -x 30 -y 50 @@ -1364,7 +1364,7 @@ test bind-15.20 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f {set x 1} set x 0 - event generate .t.f + event generate .t.f event generate .t.f event generate .t.f -time 300 event generate .t.f -time 700 @@ -1381,7 +1381,7 @@ test bind-15.21 {MatchPatterns procedure, checking "nearby"} -setup { } -body { bind .t.f {set x 1} set x 0 - event generate .t.f + event generate .t.f event generate .t.f event generate .t.f -time 300 event generate .t.f -time 900 @@ -2049,7 +2049,7 @@ test bind-16.34 {ExpandPercents procedure} -setup { destroy .t.f } -result {781 632} test bind-16.35 {ExpandPercents procedure} -constraints { - nonPortable + nonPortable } -setup { frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -2275,7 +2275,7 @@ test bind-17.6 {event command: add with error} -body { event add <> abc <1> } -cleanup { event delete <> -} -returnCodes error -result {bad event type or keysym "xyz"} +} -returnCodes error -result {bad event type or keysym "xyz"} test bind-17.7 {event command: add with error} -body { event delete <> catch {event add <> abc <1>} @@ -2368,7 +2368,7 @@ test bind-18.1 {CreateVirtualEvent procedure: GetVirtualEventUid} -body { test bind-18.2 {CreateVirtualEvent procedure: FindSequence} -body { event add <> } -returnCodes error -result {bad event type or keysym "Ctrl"} -test bind-18.3 {CreateVirtualEvent procedure: new physical} -body { +test bind-18.3 {CreateVirtualEvent procedure: new physical} -body { event delete <> event add <> event info <> @@ -2377,7 +2377,7 @@ test bind-18.3 {CreateVirtualEvent procedure: new physical} -body { } -result {} test bind-18.4 {CreateVirtualEvent procedure: duplicate physical} -body { event delete <> - event add <> + event add <> event add <> event info <> } -cleanup { @@ -2448,13 +2448,13 @@ test bind-19.7 {DeleteVirtualEvent procedure: owns 1, delete all} -body { foreach p [event info] {event delete $p} event add <> event delete <> - event info + event info } -result {} test bind-19.8 {DeleteVirtualEvent procedure: owns 1, delete 1} -body { foreach p [event info] {event delete $p} event add <> event delete <> - event info + event info } -result {} test bind-19.9 {DeleteVirtualEvent procedure: owns many, delete all} -body { foreach p [event info] {event delete $p} @@ -2506,7 +2506,7 @@ test bind-19.12 {DeleteVirtualEvent procedure: owned by 1, first in chain} -setu event generate .t.f event generate .t.f event generate .t.f - event delete <> + event delete <> event generate .t.f event generate .t.f event generate .t.f @@ -2573,7 +2573,7 @@ test bind-19.14 {DeleteVirtualEvent procedure: owned by 1, last in chain} -setup event generate .t.f event generate .t.f event generate .t.f - event delete <> + event delete <> event generate .t.f event generate .t.f event generate .t.f @@ -2609,7 +2609,7 @@ test bind-19.15 {DeleteVirtualEvent procedure: owned by many, first} -setup { event generate .t.g event generate .t.h event generate .t.h - event delete <> + event delete <> event generate .t.f event generate .t.f event generate .t.g @@ -2681,7 +2681,7 @@ test bind-19.17 {DeleteVirtualEvent procedure: owned by many, last} -setup { event generate .t.g event generate .t.h event generate .t.h - event delete <> + event delete <> event generate .t.f event generate .t.f event generate .t.g @@ -3418,7 +3418,7 @@ test bind-22.55 {HandleEventGenerate: options -override xyz} -setup { set x {} } -body { bind .t.f "lappend x %o" - event generate .t.f -override xyz + event generate .t.f -override xyz } -cleanup { destroy .t.f } -returnCodes error -result {expected boolean value but got "xyz"} @@ -3431,7 +3431,7 @@ test bind-22.56 {HandleEventGenerate: options -override 1} -setup { set x {} } -body { bind .t.f "lappend x %o" - event generate .t.f -override 1 + event generate .t.f -override 1 return $x } -cleanup { destroy .t.f @@ -3445,7 +3445,7 @@ test bind-22.57 {HandleEventGenerate: options -override 1} -setup { set x {} } -body { bind .t.f "lappend x %o" - event generate .t.f -override 1 + event generate .t.f -override 1 return $x } -cleanup { destroy .t.f @@ -3459,7 +3459,7 @@ test bind-22.58 {HandleEventGenerate: options -override 1} -setup { set x {} } -body { bind .t.f "lappend x %o" - event generate .t.f -override 1 + event generate .t.f -override 1 return $x } -cleanup { destroy .t.f @@ -3473,7 +3473,7 @@ test bind-22.59 {HandleEventGenerate: options -override 1} -setup { set x {} } -body { bind .t.f "lappend x %k" - event generate .t.f -override 1 + event generate .t.f -override 1 } -cleanup { destroy .t.f } -returnCodes error -result { event doesn't accept "-override" option} @@ -3486,7 +3486,7 @@ test bind-22.60 {HandleEventGenerate: options -place xyz} -setup { set x {} } -body { bind .t.f "lappend x %p" - event generate .t.f -place xyz + event generate .t.f -place xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad -place value "xyz": must be PlaceOnTop, or PlaceOnBottom} @@ -3499,7 +3499,7 @@ test bind-22.61 {HandleEventGenerate: options -place PlaceOnTop} -se set x {} } -body { bind .t.f "lappend x %p" - event generate .t.f -place PlaceOnTop + event generate .t.f -place PlaceOnTop return $x } -cleanup { destroy .t.f @@ -3513,7 +3513,7 @@ test bind-22.62 {HandleEventGenerate: options -place PlaceOnTop} -setup { set x {} } -body { bind .t.f "lappend x %k" - event generate .t.f -place PlaceOnTop + event generate .t.f -place PlaceOnTop } -cleanup { destroy .t.f } -returnCodes error -result { event doesn't accept "-place" option} @@ -3526,7 +3526,7 @@ test bind-22.63 {HandleEventGenerate: options -root .xyz} -setup { set x {} } -body { bind .t.f "lappend x %R" - event generate .t.f -root .xyz + event generate .t.f -root .xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad window path name ".xyz"} @@ -3539,7 +3539,7 @@ test bind-22.64 {HandleEventGenerate: options -root .t} -setup { set x {} } -body { bind .t.f "lappend x %R" - event generate .t.f -root .t + event generate .t.f -root .t expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -3553,7 +3553,7 @@ test bind-22.65 {HandleEventGenerate: options -root xyz} -setup { set x {} } -body { bind .t.f "lappend x %R" - event generate .t.f -root xyz + event generate .t.f -root xyz } -cleanup { destroy .t.f } -returnCodes error -result {bad window name/identifier "xyz"} @@ -3566,7 +3566,7 @@ test bind-22.66 {HandleEventGenerate: options -root [winfo id .t]} -setup set x {} } -body { bind .t.f "lappend x %R" - event generate .t.f -root [winfo id .t] + event generate .t.f -root [winfo id .t] expr {[winfo id .t] eq $x} } -cleanup { destroy .t.f @@ -3580,7 +3580,7 @@ test bind-22.67 {HandleEventGenerate: options