summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorculler <culler>2021-04-29 22:09:38 (GMT)
committerculler <culler>2021-04-29 22:09:38 (GMT)
commita723a9e97cc86c5cbee7c26aca2d344ad18c12a1 (patch)
treec94197ad83fef8a461bca50e4da2e16e10ede0fa
parent0e9151d4eb452e294ed0a40869ad97a7c54eed3d (diff)
parenta3be6c56b7742a8c7f8b8f3c193ae6304e2a2cb2 (diff)
downloadtk-a723a9e97cc86c5cbee7c26aca2d344ad18c12a1.zip
tk-a723a9e97cc86c5cbee7c26aca2d344ad18c12a1.tar.gz
tk-a723a9e97cc86c5cbee7c26aca2d344ad18c12a1.tar.bz2
For Aqua, use an explicit backing CALayer for the TKContentView. Fixes [d281848f97] and other rendering issues.
-rw-r--r--macosx/tkMacOSXDraw.c56
-rw-r--r--macosx/tkMacOSXFont.c2
-rw-r--r--macosx/tkMacOSXImage.c73
-rw-r--r--macosx/tkMacOSXNotify.c8
-rw-r--r--macosx/tkMacOSXPrivate.h2
-rw-r--r--macosx/tkMacOSXRegion.c2
-rw-r--r--macosx/tkMacOSXWindowEvent.c35
-rw-r--r--macosx/tkMacOSXWm.c19
-rw-r--r--tests/bind.test5
-rw-r--r--tests/entry.test455
-rw-r--r--tests/font.test6
-rw-r--r--tests/scale.test11
-rw-r--r--tests/textWind.test44
-rw-r--r--tests/ttk/spinbox.test10
-rw-r--r--tests/ttk/validate.test33
-rw-r--r--tests/unixEmbed.test1
-rwxr-xr-xunix/configure2
-rw-r--r--unix/configure.in2
18 files changed, 435 insertions, 331 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index bf6a4a7..d5396eb 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -27,6 +27,7 @@
#ifdef TK_MAC_DEBUG
#define TK_MAC_DEBUG_DRAWING
#define TK_MAC_DEBUG_IMAGE_DRAWING
+#define TK_MAC_DEBUG_CG
#endif
*/
@@ -1265,6 +1266,12 @@ TkMacOSXSetupDrawingContext(
Bool canDraw = true;
TKContentView *view = nil;
TkMacOSXDrawingContext dc = {};
+ CGFloat drawingHeight;
+
+#ifdef TK_MAC_DEBUG_CG
+ fprintf(stderr, "TkMacOSXSetupDrawingContext: %s\n",
+ macDraw->winPtr ? Tk_PathName(macDraw->winPtr) : "None");
+#endif
/*
* If the drawable is not a pixmap, get the associated NSView.
@@ -1296,13 +1303,10 @@ TkMacOSXSetupDrawingContext(
*/
dc.context = TkMacOSXGetCGContextForDrawable(d);
- if (dc.context) {
- dc.portBounds = CGContextGetClipBoundingBox(dc.context);
- } else {
+ if (!dc.context) {
NSRect drawingBounds, currentBounds;
dc.view = view;
dc.context = GET_CGCONTEXT;
- dc.portBounds = NSRectToCGRect([view bounds]);
if (dc.clipRgn) {
CGRect clipBounds;
CGAffineTransform t = { .a = 1, .b = 0, .c = 0, .d = -1, .tx = 0,
@@ -1354,15 +1358,20 @@ TkMacOSXSetupDrawingContext(
* Finish configuring the drawing context.
*/
+ drawingHeight = view ? [view bounds].size.height :
+ CGContextGetClipBoundingBox(dc.context).size.height;
CGAffineTransform t = {
.a = 1, .b = 0,
.c = 0, .d = -1,
.tx = 0,
- .ty = dc.portBounds.size.height
+ .ty = drawingHeight
};
- dc.portBounds.origin.x += macDraw->xOff;
- dc.portBounds.origin.y += macDraw->yOff;
+#ifdef TK_MAC_DEBUG_CG
+ fprintf(stderr, "TkMacOSXSetupDrawingContext: pushing GState for %s\n",
+ macDraw->winPtr ? Tk_PathName(macDraw->winPtr) : "None");
+#endif
+
CGContextSaveGState(dc.context);
CGContextSetTextDrawingMode(dc.context, kCGTextFill);
CGContextConcatCTM(dc.context, t);
@@ -1388,11 +1397,26 @@ TkMacOSXSetupDrawingContext(
*/
ChkErr(HIShapeReplacePathInCGContext, dc.clipRgn, dc.context);
+
+#ifdef TK_MAC_DEBUG_CG
+ fprintf(stderr, "Setting complex clip for %s to:\n",
+ macDraw->winPtr ? Tk_PathName(macDraw->winPtr) : "None");
+ TkMacOSXPrintRectsInRegion(dc.clipRgn);
+#endif
+
CGContextEOClip(dc.context);
- }
- else {
+ } else {
CGRect r;
HIShapeGetBounds(dc.clipRgn, &r);
+
+#ifdef TK_MAC_DEBUG_CG
+ fprintf(stderr, "Current clip BBox is %s\n",
+ NSStringFromRect(CGContextGetClipBoundingBox(GET_CGCONTEXT)).UTF8String);
+ fprintf(stderr, "Setting clip for %s to rect %s:\n",
+ macDraw->winPtr ? Tk_PathName(macDraw->winPtr) : "None",
+ NSStringFromRect(r).UTF8String);
+#endif
+
CGContextClipToRect(dc.context, r);
}
}
@@ -1413,8 +1437,8 @@ TkMacOSXSetupDrawingContext(
TkMacOSXSetColorInContext(gc, gc->foreground, dc.context);
if (view) {
- CGContextSetPatternPhase(dc.context,
- CGSizeMake(dc.portBounds.size.width, dc.portBounds.size.height));
+ CGSize size = NSSizeToCGSize([view bounds].size);
+ CGContextSetPatternPhase(dc.context, size);
}
if (gc->function != GXcopy) {
TkMacOSXDbgMsg("Logical functions other than GXcopy are "
@@ -1491,13 +1515,21 @@ TkMacOSXRestoreDrawingContext(
if (dcPtr->context) {
CGContextSynchronize(dcPtr->context);
CGContextRestoreGState(dcPtr->context);
+
+#ifdef TK_MAC_DEBUG_CG
+ fprintf(stderr, "TkMacOSXRestoreDrawingContext: popped GState\n");
+#endif
+
}
if (dcPtr->clipRgn) {
CFRelease(dcPtr->clipRgn);
+ dcPtr->clipRgn = NULL;
}
+
#ifdef TK_MAC_DEBUG
bzero(dcPtr, sizeof(TkMacOSXDrawingContext));
-#endif /* TK_MAC_DEBUG */
+#endif
+
}
/*
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index feff3bf..d9c1c01 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -1219,7 +1219,7 @@ TkpDrawAngledCharsInContext(
(CFAttributedStringRef)attributedString);
textX += (CGFloat) macWin->xOff;
textY += (CGFloat) macWin->yOff;
- height = drawingContext.portBounds.size.height;
+ height = [drawingContext.view bounds].size.height;
textY = height - textY;
t = CGAffineTransformMake(1.0, 0.0, 0.0, -1.0, 0.0, height);
if (angle != 0.0) {
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 69967af..de19f2b 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -528,51 +528,42 @@ CreateCGImageFromDrawableRect(
{
MacDrawable *mac_drawable = (MacDrawable *)drawable;
CGContextRef cg_context = NULL;
+ CGRect image_rect = CGRectMake(x, y, width, height);
CGImageRef cg_image = NULL, result = NULL;
- NSBitmapImageRep *bitmapRep = nil;
- NSView *view = nil;
+ unsigned char *imageData = NULL;
if (mac_drawable->flags & TK_IS_PIXMAP) {
- /*
- * This MacDrawable is a bitmap, so its view is NULL.
- */
-
- CGRect image_rect = CGRectMake(x, y, width, height);
-
cg_context = TkMacOSXGetCGContextForDrawable(drawable);
- cg_image = CGBitmapContextCreateImage((CGContextRef) cg_context);
- if (cg_image) {
- result = CGImageCreateWithImageInRect(cg_image, image_rect);
- CGImageRelease(cg_image);
- }
- } else if (TkMacOSXGetNSViewForDrawable(mac_drawable) != nil) {
-
- /*
- * Convert Tk top-left to NSView bottom-left coordinates.
- */
-
- int view_height = [view bounds].size.height;
- NSRect view_rect = NSMakeRect(x + mac_drawable->xOff,
- view_height - height - y - mac_drawable->yOff,
- width, height);
-
- /*
- * Attempt to copy from the view to a bitmapImageRep. If the view does
- * not have a valid CGContext, doing this will silently corrupt memory
- * and make a big mess. So, in that case, we just return NULL.
- */
-
- if (view == [NSView focusView]) {
- bitmapRep = [view bitmapImageRepForCachingDisplayInRect: view_rect];
- [view cacheDisplayInRect:view_rect toBitmapImageRep:bitmapRep];
- result = [bitmapRep CGImage];
- CFRelease(bitmapRep);
- } else {
- TkMacOSXDbgMsg("No CGContext - cannot copy from screen to bitmap.");
- result = NULL;
+ if (cg_context) {
+ cg_image = CGBitmapContextCreateImage((CGContextRef) cg_context);
}
} else {
- TkMacOSXDbgMsg("Invalid source drawable");
+ NSView *view = TkMacOSXGetNSViewForDrawable(mac_drawable);
+ if (view == nil) {
+ TkMacOSXDbgMsg("Invalid source drawable");
+ return NULL;
+ }
+ NSSize size = view.frame.size;
+ NSUInteger width = size.width, height = size.height;
+ NSUInteger bytesPerPixel = 4,
+ bytesPerRow = bytesPerPixel * width,
+ bitsPerComponent = 8;
+ imageData = ckalloc(height * bytesPerRow);
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+ cg_context = CGBitmapContextCreate(imageData, width, height,
+ bitsPerComponent, bytesPerRow, colorSpace,
+ kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
+ CFRelease(colorSpace);
+ [view.layer renderInContext:cg_context];
+ }
+ if (cg_context) {
+ cg_image = CGBitmapContextCreateImage(cg_context);
+ CGContextRelease(cg_context);
+ }
+ if (cg_image) {
+ result = CGImageCreateWithImageInRect(cg_image, image_rect);
+ CGImageRelease(cg_image);
}
+ ckfree(imageData);
return result;
}
@@ -676,11 +667,11 @@ XGetImage(
|| bytes_per_row < 4 * width
|| size != bytes_per_row * height) {
TkMacOSXDbgMsg("XGetImage: Unrecognized bitmap format");
- CFRelease(bitmapRep);
+ [bitmapRep release];
return NULL;
}
memcpy(bitmap, (char *)[bitmapRep bitmapData], size);
- CFRelease(bitmapRep);
+ [bitmapRep release];
/*
* When Apple extracts a bitmap from an NSView, it may be in either
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index f32fa76..208d846 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -340,8 +340,9 @@ TkMacOSXNotifyExitHandler(
* for all views that need display before it returns. We call it with
* deQueue=NO so that it will not change anything on the AppKit event
* queue, because we only want the side effect that it runs drawRect. The
- * only time when any NSViews have the needsDisplay property set to YES
- * is during execution of this function.
+ * only times when any NSViews have the needsDisplay property set to YES
+ * are during execution of this function or in the addDirtyRect method
+ * of TKContentView.
*
* The reason for running this function as an idle task is to try to
* arrange that all widgets will be fully configured before they are
@@ -377,7 +378,8 @@ TkMacOSXDrawAllViews(
if (dirtyCount) {
continue;
}
- [view setNeedsDisplayInRect:[view tkDirtyRect]];
+ [[view layer] setNeedsDisplayInRect:[view tkDirtyRect]];
+ [view setNeedsDisplay:YES];
}
} else {
[window displayIfNeeded];
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index 0bd46c6..be2264f 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -27,6 +27,7 @@
#define TextStyle MacTextStyle
#import <ApplicationServices/ApplicationServices.h>
#import <Cocoa/Cocoa.h>
+#import <QuartzCore/QuartzCore.h>
#ifndef NO_CARBON_H
#import <Carbon/Carbon.h>
#endif
@@ -203,7 +204,6 @@ typedef struct TkMacOSXDrawingContext {
CGContextRef context;
NSView *view;
HIShapeRef clipRgn;
- CGRect portBounds;
} TkMacOSXDrawingContext;
/*
diff --git a/macosx/tkMacOSXRegion.c b/macosx/tkMacOSXRegion.c
index 3c168f1..fbb41cb 100644
--- a/macosx/tkMacOSXRegion.c
+++ b/macosx/tkMacOSXRegion.c
@@ -575,7 +575,7 @@ rectPrinter(
void *ref)
{
if (rect) {
- printf(" %s\n", NSStringFromRect(*rect).UTF8String);
+ fprintf(stderr, " %s\n", NSStringFromRect(*rect).UTF8String);
}
return noErr;
}
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 0075fb8..f7a160a 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -915,11 +915,46 @@ ConfigureRestrictProc(
@implementation TKContentView(TKWindowEvent)
+- (id)initWithFrame:(NSRect)frame
+{
+ self = [super initWithFrame:frame];
+ if (self) {
+ /*
+ * The layer must exist before we set wantsLayer to YES.
+ */
+
+ self.layer = [CALayer layer];
+ self.wantsLayer = YES;
+ self.layerContentsRedrawPolicy = NSViewLayerContentsRedrawOnSetNeedsDisplay;
+ self.layer.contentsGravity = self.layer.contentsAreFlipped ?
+ kCAGravityTopLeft : kCAGravityBottomLeft;
+
+ /*
+ * Nothing gets drawn at all if the layer does not have a delegate.
+ * Currently, we do not implement any methods of the delegate, however.
+ */
+
+ self.layer.delegate = (id) self;
+ }
+ return self;
+}
+
+/*
+ * We will just use drawRect.
+ */
+
+- (BOOL) wantsUpdateLayer
+{
+ return NO;
+}
+
- (void) addTkDirtyRect: (NSRect) rect
{
_tkNeedsDisplay = YES;
_tkDirtyRect = NSUnionRect(_tkDirtyRect, rect);
[NSApp setNeedsToDraw:YES];
+ [self setNeedsDisplay:YES];
+ [[self layer] setNeedsDisplay];
}
- (void) clearTkDirtyRect
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 4f073d8..e039072 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -5535,12 +5535,15 @@ Tk_MacOSXGetTkWindow(
void *w)
{
Window window = None;
- TkDisplay *dispPtr = TkGetDisplayList();
if ([(NSWindow *)w respondsToSelector: @selector (tkWindow)]) {
window = [(TKWindow *)w tkWindow];
}
- return (window != None ?
- Tk_IdToWindow(dispPtr->display, window) : NULL);
+ if (window) {
+ TkDisplay *dispPtr = TkGetDisplayList();
+ return Tk_IdToWindow(dispPtr->display, window);
+ } else {
+ return NULL;
+ }
}
/*
@@ -6271,6 +6274,7 @@ TkMacOSXMakeRealWindowExist(
Tk_ChangeWindowAttributes((Tk_Window)winPtr, CWOverrideRedirect, &atts);
ApplyContainerOverrideChanges(winPtr, NULL);
}
+ [window display];
}
/*
@@ -6442,6 +6446,12 @@ TkpWmSetState(
macWin = TkMacOSXGetNSWindowForDrawable(winPtr->window);
+ /*
+ * Make sure windows are updated before the state change.
+ */
+
+ while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)) {};
+
if (state == WithdrawnState) {
Tk_UnmapWindow((Tk_Window)winPtr);
} else if (state == IconicState) {
@@ -6462,8 +6472,9 @@ TkpWmSetState(
[macWin orderFront:NSApp];
TkMacOSXZoomToplevel(macWin, state == NormalState ? inZoomIn : inZoomOut);
}
+
/*
- * Make sure windows are updated after the state change.
+ * Make sure windows are updated after the state change too.
*/
while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)){}
diff --git a/tests/bind.test b/tests/bind.test
index 7a075fe..f653f3e 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -1052,6 +1052,7 @@ test bind-13.45 {Tk_BindEvent procedure: error in script} -setup {
test bind-15.1 {MatchPatterns procedure, ignoring type mismatches} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
+ update idletasks
focus -force .t.f
update
} -body {
@@ -1068,6 +1069,7 @@ test bind-15.1 {MatchPatterns procedure, ignoring type mismatches} -setup {
test bind-15.2 {MatchPatterns procedure, ignoring type mismatches} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
+ update idletasks
focus -force .t.f
update
} -body {
@@ -1479,6 +1481,7 @@ test bind-15.26 {MatchPatterns procedure, reject a virtual event} -setup {
test bind-15.27 {MatchPatterns procedure, conflict resolution} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
+ update idletasks
focus -force .t.f
update
} -body {
@@ -1493,6 +1496,7 @@ test bind-15.27 {MatchPatterns procedure, conflict resolution} -setup {
test bind-15.28 {MatchPatterns procedure, conflict resolution} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
+ update idletasks
focus -force .t.f
update
} -body {
@@ -1507,6 +1511,7 @@ test bind-15.28 {MatchPatterns procedure, conflict resolution} -setup {
test bind-15.29 {MatchPatterns procedure, conflict resolution} -setup {
frame .t.f -class Test -width 150 -height 100
pack .t.f
+ update idletasks
focus -force .t.f
update
} -body {
diff --git a/tests/entry.test b/tests/entry.test
index ef70a9e..d67980a 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -47,7 +47,7 @@ set cy [font metrics {Courier -12} -linespace]
test entry-1.1 {configuration option: "background" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -background #ff0000
@@ -57,7 +57,7 @@ test entry-1.1 {configuration option: "background" for entry} -setup {
} -result {#ff0000}
test entry-1.2 {configuration option: "background" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -background non-existent
@@ -67,7 +67,7 @@ test entry-1.2 {configuration option: "background" for entry} -setup {
test entry-1.3 {configuration option: "bd" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -bd 4
@@ -77,7 +77,7 @@ test entry-1.3 {configuration option: "bd" for entry} -setup {
} -result 4
test entry-1.4 {configuration option: "bd" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -bd badValue
@@ -87,7 +87,7 @@ test entry-1.4 {configuration option: "bd" for entry} -setup {
test entry-1.5 {configuration option: "bg" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -bg #ff0000
@@ -97,7 +97,7 @@ test entry-1.5 {configuration option: "bg" for entry} -setup {
} -result {#ff0000}
test entry-1.6 {configuration option: "bg" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -bg non-existent
@@ -107,7 +107,7 @@ test entry-1.6 {configuration option: "bg" for entry} -setup {
test entry-1.7 {configuration option: "borderwidth" for entry} -setup {
entry .e -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -borderwidth 1.3
@@ -117,7 +117,7 @@ test entry-1.7 {configuration option: "borderwidth" for entry} -setup {
} -result 1
test entry-1.8 {configuration option: "borderwidth" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -borderwidth badValue
@@ -127,7 +127,7 @@ test entry-1.8 {configuration option: "borderwidth" for entry} -setup {
test entry-1.9 {configuration option: "cursor" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -cursor arrow
@@ -137,7 +137,7 @@ test entry-1.9 {configuration option: "cursor" for entry} -setup {
} -result {arrow}
test entry-1.10 {configuration option: "cursor" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -cursor badValue
@@ -147,7 +147,7 @@ test entry-1.10 {configuration option: "cursor" for entry} -setup {
test entry-1.11 {configuration option: "disabledbackground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -disabledbackground green
@@ -157,7 +157,7 @@ test entry-1.11 {configuration option: "disabledbackground" for entry} -setup {
} -result {green}
test entry-1.12 {configuration option: "disabledbackground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -disabledbackground non-existent
@@ -167,7 +167,7 @@ test entry-1.12 {configuration option: "disabledbackground" for entry} -setup {
test entry-1.13 {configuration option: "disabledforeground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -disabledforeground blue
@@ -177,7 +177,7 @@ test entry-1.13 {configuration option: "disabledforeground" for entry} -setup {
} -result {blue}
test entry-1.14 {configuration option: "disabledforeground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -disabledforeground non-existent
@@ -187,7 +187,7 @@ test entry-1.14 {configuration option: "disabledforeground" for entry} -setup {
test entry-1.15 {configuration option: "exportselection" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -exportselection yes
@@ -197,7 +197,7 @@ test entry-1.15 {configuration option: "exportselection" for entry} -setup {
} -result 1
test entry-1.16 {configuration option: "exportselection" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -exportselection xyzzy
@@ -207,7 +207,7 @@ test entry-1.16 {configuration option: "exportselection" for entry} -setup {
test entry-1.17 {configuration option: "fg" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -fg #110022
@@ -217,7 +217,7 @@ test entry-1.17 {configuration option: "fg" for entry} -setup {
} -result {#110022}
test entry-1.18 {configuration option: "fg" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -fg non-existent
@@ -227,7 +227,7 @@ test entry-1.18 {configuration option: "fg" for entry} -setup {
test entry-1.19 {configuration option: "font" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -font {Helvetica -12}
@@ -237,7 +237,7 @@ test entry-1.19 {configuration option: "font" for entry} -setup {
} -result {Helvetica -12}
test entry-1.20 {configuration option: "font" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -font {}
@@ -247,7 +247,7 @@ test entry-1.20 {configuration option: "font" for entry} -setup {
test entry-1.21 {configuration option: "foreground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -foreground #110022
@@ -257,7 +257,7 @@ test entry-1.21 {configuration option: "foreground" for entry} -setup {
} -result {#110022}
test entry-1.22 {configuration option: "foreground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -foreground non-existent
@@ -267,7 +267,7 @@ test entry-1.22 {configuration option: "foreground" for entry} -setup {
test entry-1.23 {configuration option: "highlightbackground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -highlightbackground #110022
@@ -277,7 +277,7 @@ test entry-1.23 {configuration option: "highlightbackground" for entry} -setup {
} -result {#110022}
test entry-1.24 {configuration option: "highlightbackground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -highlightbackground non-existent
@@ -287,7 +287,7 @@ test entry-1.24 {configuration option: "highlightbackground" for entry} -setup {
test entry-1.25 {configuration option: "highlightcolor" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -highlightcolor #110022
@@ -297,7 +297,7 @@ test entry-1.25 {configuration option: "highlightcolor" for entry} -setup {
} -result {#110022}
test entry-1.26 {configuration option: "highlightcolor" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -highlightcolor non-existent
@@ -307,7 +307,7 @@ test entry-1.26 {configuration option: "highlightcolor" for entry} -setup {
test entry-1.27 {configuration option: "highlightthickness" for entry} -setup {
entry .e -borderwidth 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -highlightthickness 6
@@ -317,7 +317,7 @@ test entry-1.27 {configuration option: "highlightthickness" for entry} -setup {
} -result 6
test entry-1.28 {configuration option: "highlightthickness" for entry} -setup {
entry .e -borderwidth 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -highlightthickness -2
@@ -327,7 +327,7 @@ test entry-1.28 {configuration option: "highlightthickness" for entry} -setup {
} -result 0
test entry-1.29 {configuration option: "highlightthickness" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -highlightthickness badValue
@@ -337,7 +337,7 @@ test entry-1.29 {configuration option: "highlightthickness" for entry} -setup {
test entry-1.30 {configuration option: "insertbackground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -insertbackground #110022
@@ -347,7 +347,7 @@ test entry-1.30 {configuration option: "insertbackground" for entry} -setup {
} -result {#110022}
test entry-1.31 {configuration option: "insertbackground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -insertbackground non-existent
@@ -357,7 +357,7 @@ test entry-1.31 {configuration option: "insertbackground" for entry} -setup {
test entry-1.32 {configuration option: "insertborderwidth" for entry} -setup {
entry .e -borderwidth 2 -insertwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -insertborderwidth 1.3
@@ -367,7 +367,7 @@ test entry-1.32 {configuration option: "insertborderwidth" for entry} -setup {
} -result 1
test entry-1.33 {configuration option: "insertborderwidth" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -insertborderwidth 2.6x
@@ -377,7 +377,7 @@ test entry-1.33 {configuration option: "insertborderwidth" for entry} -setup {
test entry-1.34 {configuration option: "insertofftime" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -insertofftime 100
@@ -387,7 +387,7 @@ test entry-1.34 {configuration option: "insertofftime" for entry} -setup {
} -result 100
test entry-1.35 {configuration option: "insertofftime" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -insertofftime 3.2
@@ -397,7 +397,7 @@ test entry-1.35 {configuration option: "insertofftime" for entry} -setup {
test entry-1.36 {configuration option: "insertontime" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -insertontime 100
@@ -407,7 +407,7 @@ test entry-1.36 {configuration option: "insertontime" for entry} -setup {
} -result 100
test entry-1.37 {configuration option: "insertontime" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -insertontime 3.2
@@ -417,7 +417,7 @@ test entry-1.37 {configuration option: "insertontime" for entry} -setup {
test entry-1.38 {configuration option: "invalidcommand" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -invalidcommand "any string"
@@ -428,7 +428,7 @@ test entry-1.38 {configuration option: "invalidcommand" for entry} -setup {
test entry-1.39 {configuration option: "invcmd" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -invcmd "any string"
@@ -439,7 +439,7 @@ test entry-1.39 {configuration option: "invcmd" for entry} -setup {
test entry-1.40 {configuration option: "justify" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -justify right
@@ -449,7 +449,7 @@ test entry-1.40 {configuration option: "justify" for entry} -setup {
} -result {right}
test entry-1.41 {configuration option: "justify" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -justify bogus
@@ -459,7 +459,7 @@ test entry-1.41 {configuration option: "justify" for entry} -setup {
test entry-1.42 {configuration option: "readonlybackground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -readonlybackground green
@@ -469,7 +469,7 @@ test entry-1.42 {configuration option: "readonlybackground" for entry} -setup {
} -result {green}
test entry-1.43 {configuration option: "readonlybackground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -readonlybackground non-existent
@@ -479,7 +479,7 @@ test entry-1.43 {configuration option: "readonlybackground" for entry} -setup {
test entry-1.44 {configuration option: "relief" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -relief flat
@@ -490,7 +490,7 @@ test entry-1.44 {configuration option: "relief" for entry} -setup {
test entry-1.45 {configuration option: "selectbackground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -selectbackground #110022
@@ -500,7 +500,7 @@ test entry-1.45 {configuration option: "selectbackground" for entry} -setup {
} -result {#110022}
test entry-1.46 {configuration option: "selectbackground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -selectbackground non-existent
@@ -510,7 +510,7 @@ test entry-1.46 {configuration option: "selectbackground" for entry} -setup {
test entry-1.47 {configuration option: "selectborderwidth" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -selectborderwidth 1.3
@@ -520,7 +520,7 @@ test entry-1.47 {configuration option: "selectborderwidth" for entry} -setup {
} -result 1
test entry-1.48 {configuration option: "selectborderwidth" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -selectborderwidth badValue
@@ -530,7 +530,7 @@ test entry-1.48 {configuration option: "selectborderwidth" for entry} -setup {
test entry-1.49 {configuration option: "selectforeground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -selectforeground #110022
@@ -540,7 +540,7 @@ test entry-1.49 {configuration option: "selectforeground" for entry} -setup {
} -result {#110022}
test entry-1.50 {configuration option: "selectforeground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -selectforeground non-existent
@@ -550,7 +550,7 @@ test entry-1.50 {configuration option: "selectforeground" for entry} -setup {
test entry-1.51 {configuration option: "show" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -show *
@@ -561,7 +561,7 @@ test entry-1.51 {configuration option: "show" for entry} -setup {
test entry-1.52 {configuration option: "state" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -state n
@@ -571,7 +571,7 @@ test entry-1.52 {configuration option: "state" for entry} -setup {
} -result {normal}
test entry-1.53 {configuration option: "state" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -state bogus
@@ -581,7 +581,7 @@ test entry-1.53 {configuration option: "state" for entry} -setup {
test entry-1.54 {configuration option: "takefocus" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -takefocus "any string"
@@ -592,7 +592,7 @@ test entry-1.54 {configuration option: "takefocus" for entry} -setup {
test entry-1.55 {configuration option: "textvariable" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -textvariable i
@@ -603,7 +603,7 @@ test entry-1.55 {configuration option: "textvariable" for entry} -setup {
test entry-1.56 {configuration option: "width" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -width 402
@@ -613,7 +613,7 @@ test entry-1.56 {configuration option: "width" for entry} -setup {
} -result 402
test entry-1.57 {configuration option: "width" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -width 3p
@@ -623,7 +623,7 @@ test entry-1.57 {configuration option: "width" for entry} -setup {
test entry-1.58 {configuration option: "xscrollcommand" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -xscrollcommand {Some command}
@@ -642,7 +642,7 @@ test entry-2.2 {Tk_EntryCmd procedure} -body {
} -returnCodes error -result {bad window path name "gorp"}
test entry-2.3 {Tk_EntryCmd procedure} -body {
entry .e
- pack .e
+ pack .e ; update idletasks
update
list [winfo exists .e] [winfo class .e] [info commands .e]
} -cleanup {
@@ -668,7 +668,7 @@ test entry-2.5 {Tk_EntryCmd procedure} -body {
test entry-3.1 {EntryWidgetCmd procedure} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e
@@ -677,7 +677,7 @@ test entry-3.1 {EntryWidgetCmd procedure} -setup {
} -returnCodes error -result {wrong # args: should be ".e option ?arg ...?"}
test entry-3.2 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e bbox
@@ -686,7 +686,7 @@ test entry-3.2 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
} -returnCodes error -result {wrong # args: should be ".e bbox index"}
test entry-3.3 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e bbox a b
@@ -695,7 +695,7 @@ test entry-3.3 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
} -returnCodes error -result {wrong # args: should be ".e bbox index"}
test entry-3.4 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e bbox bogus
@@ -704,7 +704,7 @@ test entry-3.4 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
} -returnCodes error -result {bad entry index "bogus"}
test entry-3.5 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e bbox 0
@@ -719,7 +719,7 @@ test entry-3.6 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
# Tcl_UtfAtIndex(): no utf chars
@@ -732,7 +732,7 @@ test entry-3.7 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
# Tcl_UtfAtIndex(): utf at end
@@ -745,7 +745,7 @@ test entry-3.8 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
# Tcl_UtfAtIndex(): utf before index
@@ -756,7 +756,7 @@ test entry-3.8 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
} -result {31 5 7 13}
test entry-3.9 {EntryWidgetCmd procedure, "bbox" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
# Tcl_UtfAtIndex(): no chars
@@ -768,7 +768,7 @@ test entry-3.10 {EntryWidgetCmd procedure, "bbox" widget command} -constraints {
fonts
} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert 0 "abcdefghij\u4e4eklmnop"
@@ -807,7 +807,7 @@ test entry-3.14 {EntryWidgetCmd procedure, "cget" widget command} -setup {
} -result 4
test entry-3.15 {EntryWidgetCmd procedure, "configure" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
llength [.e configure]
@@ -860,7 +860,7 @@ test entry-3.21 {EntryWidgetCmd procedure, "delete" widget command} -setup {
} -returnCodes error -result {bad entry index "bar"}
test entry-3.22 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "01234567890"
@@ -880,7 +880,7 @@ test entry-3.23 {EntryWidgetCmd procedure, "delete" widget command} -setup {
} -result 0123457890
test entry-3.24 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
set x {}
} -body {
@@ -901,7 +901,7 @@ test entry-3.24 {EntryWidgetCmd procedure, "delete" widget command} -setup {
} -result [list "01234\u4e4e7890" "0123457890" "012345\u4e4e890"]
test entry-3.25 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "01234567890"
@@ -912,7 +912,7 @@ test entry-3.25 {EntryWidgetCmd procedure, "delete" widget command} -setup {
} -result 01234567890
test entry-3.26 {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "01234567890"
@@ -925,7 +925,7 @@ test entry-3.26 {EntryWidgetCmd procedure, "delete" widget command} -setup {
} -result 01234567890
test entry-3.26a {EntryWidgetCmd procedure, "delete" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "01234567890"
@@ -989,7 +989,7 @@ test entry-3.33 {EntryWidgetCmd procedure, "index" widget command} -setup {
} -returnCodes error -result {bad entry index "foo"}
test entry-3.34 {EntryWidgetCmd procedure, "index" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e index 0
@@ -998,7 +998,7 @@ test entry-3.34 {EntryWidgetCmd procedure, "index" widget command} -setup {
} -returnCodes {ok} -match glob -result {*}
test entry-3.35 {EntryWidgetCmd procedure, "index" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
# UTF
@@ -1030,7 +1030,7 @@ test entry-3.38 {EntryWidgetCmd procedure, "insert" widget command} -setup {
} -returnCodes error -result {bad entry index "foo"}
test entry-3.39 {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "01234567890"
@@ -1041,7 +1041,7 @@ test entry-3.39 {EntryWidgetCmd procedure, "insert" widget command} -setup {
} -result {012xxx34567890}
test entry-3.40 {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "01234567890"
@@ -1054,7 +1054,7 @@ test entry-3.40 {EntryWidgetCmd procedure, "insert" widget command} -setup {
} -result 01234567890
test entry-3.40a {EntryWidgetCmd procedure, "insert" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "01234567890"
@@ -1074,7 +1074,7 @@ test entry-3.41 {EntryWidgetCmd procedure, "insert" widget command} -setup {
} -returnCodes error -result {wrong # args: should be ".e insert index text"}
test entry-3.42 {EntryWidgetCmd procedure, "scan" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e scan a
@@ -1083,7 +1083,7 @@ test entry-3.42 {EntryWidgetCmd procedure, "scan" widget command} -setup {
} -returnCodes error -result {wrong # args: should be ".e scan mark|dragto x"}
test entry-3.43 {EntryWidgetCmd procedure, "scan" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e scan a b c
@@ -1092,7 +1092,7 @@ test entry-3.43 {EntryWidgetCmd procedure, "scan" widget command} -setup {
} -returnCodes error -result {wrong # args: should be ".e scan mark|dragto x"}
test entry-3.44 {EntryWidgetCmd procedure, "scan" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e scan foobar 20
@@ -1101,7 +1101,7 @@ test entry-3.44 {EntryWidgetCmd procedure, "scan" widget command} -setup {
} -returnCodes error -result {bad scan option "foobar": must be mark or dragto}
test entry-3.45 {EntryWidgetCmd procedure, "scan" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e scan mark 20.1
@@ -1114,7 +1114,7 @@ test entry-3.46 {EntryWidgetCmd procedure, "scan" widget command} -constraints {
fonts
} -setup {
entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "This is quite a long string, in fact a "
@@ -1161,7 +1161,7 @@ test entry-3.50 {EntryWidgetCmd procedure, "select clear" widget command} -setup
} -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined}
test entry-3.50.1 {EntryWidgetCmd procedure, "select clear" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "0123456789"
@@ -1184,7 +1184,7 @@ test entry-3.51 {EntryWidgetCmd procedure, "selection present" widget command} -
} -returnCodes error -result {wrong # args: should be ".e selection present"}
test entry-3.52 {EntryWidgetCmd procedure, "selection present" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end 0123456789
@@ -1196,7 +1196,7 @@ test entry-3.52 {EntryWidgetCmd procedure, "selection present" widget command} -
} -result 1
test entry-3.53 {EntryWidgetCmd procedure, "selection present" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end 0123456789
@@ -1209,7 +1209,7 @@ test entry-3.53 {EntryWidgetCmd procedure, "selection present" widget command} -
} -result 1
test entry-3.54 {EntryWidgetCmd procedure, "selection present" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end 0123456789
@@ -1236,7 +1236,7 @@ test entry-3.56 {EntryWidgetCmd procedure, "selection adjust" widget command} -s
} -returnCodes error -result {wrong # args: should be ".e selection adjust index"}
test entry-3.57 {EntryWidgetCmd procedure, "selection adjust" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "0123456789"
@@ -1250,7 +1250,7 @@ test entry-3.57 {EntryWidgetCmd procedure, "selection adjust" widget command} -s
} -result 123
test entry-3.58 {EntryWidgetCmd procedure, "selection adjust" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "0123456789"
@@ -1297,7 +1297,7 @@ test entry-3.62 {EntryWidgetCmd procedure, "selection range" widget command} -se
} -returnCodes error -result {selection isn't in widget .e}
test entry-3.63 {EntryWidgetCmd procedure, "selection range" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end 0123456789
@@ -1310,7 +1310,7 @@ test entry-3.63 {EntryWidgetCmd procedure, "selection range" widget command} -se
} -result {2 9 3}
test entry-3.64 {EntryWidgetCmd procedure, "selection" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end 0123456789
@@ -1324,7 +1324,7 @@ test entry-3.64 {EntryWidgetCmd procedure, "selection" widget command} -setup {
} -result {0 10}
test entry-3.64a {EntryWidgetCmd procedure, "selection" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end 0123456789
@@ -1338,7 +1338,7 @@ test entry-3.64a {EntryWidgetCmd procedure, "selection" widget command} -setup {
} -result {2 4}
test entry-3.64b {EntryWidgetCmd procedure, "selection to" widget command} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
@@ -1350,7 +1350,7 @@ test entry-3.64b {EntryWidgetCmd procedure, "selection to" widget command} -setu
test entry-3.65 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1362,7 +1362,7 @@ test entry-3.65 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -result {0.0537634 0.2688172}
test entry-3.66 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e xview gorp
@@ -1371,7 +1371,7 @@ test entry-3.66 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -returnCodes error -result {bad entry index "gorp"}
test entry-3.67 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1385,7 +1385,7 @@ test entry-3.67 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -result {0.107527 0.322581}
test entry-3.68 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e xview moveto foo bar
@@ -1394,7 +1394,7 @@ test entry-3.68 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -returnCodes error -result {wrong # args: should be ".e xview moveto fraction"}
test entry-3.69 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e xview moveto foo
@@ -1403,7 +1403,7 @@ test entry-3.69 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -returnCodes error -result {expected floating-point number but got "foo"}
test entry-3.70 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1415,7 +1415,7 @@ test entry-3.70 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -result {0.505376 0.720430}
test entry-3.71 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1426,7 +1426,7 @@ test entry-3.71 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -returnCodes error -result {wrong # args: should be ".e xview scroll number units|pages"}
test entry-3.72 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
@@ -1437,7 +1437,7 @@ test entry-3.72 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -returnCodes error -result {expected integer but got "gorp"}
test entry-3.73 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
@@ -1450,7 +1450,7 @@ test entry-3.73 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -result {0.193548 0.408602}
test entry-3.74 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1464,7 +1464,7 @@ test entry-3.74 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -result {0.397849 0.612903}
test entry-3.75 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
@@ -1478,7 +1478,7 @@ test entry-3.75 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -result 32
test entry-3.76 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
@@ -1492,7 +1492,7 @@ test entry-3.76 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -result 29
test entry-3.77 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
@@ -1503,7 +1503,7 @@ test entry-3.77 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -returnCodes error -result {bad argument "foobars": must be units or pages}
test entry-3.78 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
@@ -1514,7 +1514,7 @@ test entry-3.78 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -returnCodes error -result {unknown option "eat": must be moveto or scroll}
test entry-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e insert end "This is quite a long text string, so long that it "
@@ -1528,7 +1528,7 @@ test entry-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -result 0
test entry-3.80 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
@@ -1540,7 +1540,7 @@ test entry-3.80 {EntryWidgetCmd procedure, "xview" widget command} -setup {
} -result 73
test entry-3.86 {EntryWidgetCmd procedure, "xview" widget command} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
@@ -1562,7 +1562,7 @@ test entry-3.86 {EntryWidgetCmd procedure, "xview" widget command} -setup {
test entry-3.82 {EntryWidgetCmd procedure} -setup {
entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e gorp
@@ -1576,7 +1576,7 @@ test entry-3.82 {EntryWidgetCmd procedure} -setup {
test entry-4.1 {DestroyEntry procedure} -body {
entry .e -textvariable x -show *
- pack .e
+ pack .e ; update idletasks
.e insert end "Sample text"
update
destroy .e
@@ -1631,7 +1631,7 @@ test entry-5.5 {ConfigureEntry procedure} -setup {
.e2 insert end "This is some sample text"
.e1 configure -exportselection false
.e1 insert end "0123456789"
- pack .e1 .e2
+ pack .e1 .e2 ; update idletasks
.e2 select from 0
.e2 select to 10
lappend x [selection get]
@@ -1646,7 +1646,7 @@ test entry-5.5 {ConfigureEntry procedure} -setup {
} -result {{This is so} {This is so} 1234}
test entry-5.6 {ConfigureEntry procedure} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert end "0123456789"
.e select from 1
@@ -1658,7 +1658,7 @@ test entry-5.6 {ConfigureEntry procedure} -setup {
} -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined}
test entry-5.6.1 {ConfigureEntry procedure} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert end "0123456789"
.e select from 1
@@ -1672,7 +1672,7 @@ test entry-5.6.1 {ConfigureEntry procedure} -setup {
test entry-5.7 {ConfigureEntry procedure} -setup {
entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Courier -12} -width 4 -xscrollcommand scroll
.e insert end "01234567890"
@@ -1691,7 +1691,7 @@ test entry-5.8 {ConfigureEntry procedure} -constraints {
fonts failsOnXQuarz
} -setup {
entry .e -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -width 0 -font {Helvetica -12}
.e insert end "0123"
@@ -1706,7 +1706,7 @@ test entry-5.9 {ConfigureEntry procedure} -constraints {
fonts
} -setup {
entry .e -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised
.e insert end "0123"
@@ -1719,7 +1719,7 @@ test entry-5.10 {ConfigureEntry procedure} -constraints {
fonts
} -setup {
entry .e -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Courier -12} -bd 2 -relief flat
.e insert end "0123"
@@ -1730,7 +1730,7 @@ test entry-5.10 {ConfigureEntry procedure} -constraints {
} -result {0 0 1 1}
test entry-5.11 {ConfigureEntry procedure} -setup {
entry .e -borderwidth 2 -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
# If "0" in selected font had 0 width, caused divide-by-zero error.
.e configure -font {{open look glyph}}
@@ -1746,7 +1746,7 @@ test entry-6.1 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 \
-highlightthickness 3
@@ -1760,7 +1760,7 @@ test entry-6.2 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 \
-justify center -highlightthickness 3
@@ -1774,7 +1774,7 @@ test entry-6.3 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 20 \
-justify right -highlightthickness 3
@@ -1786,7 +1786,7 @@ test entry-6.3 {EntryComputeGeometry procedure} -constraints {
} -result {3 4}
test entry-6.4 {EntryComputeGeometry procedure} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 5
.e insert end "01234567890"
@@ -1798,7 +1798,7 @@ test entry-6.4 {EntryComputeGeometry procedure} -setup {
} -result 6
test entry-6.5 {EntryComputeGeometry procedure} -setup {
entry .e -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 5
.e insert end "01234567890"
@@ -1812,7 +1812,7 @@ test entry-6.6 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Courier -12} -bd 2 -relief raised -width 10
.e insert end "01234\t67890"
@@ -1826,7 +1826,7 @@ test entry-6.7 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Helvetica -24} -bd 3 -relief raised -width 5
.e insert end "01234567"
@@ -1839,7 +1839,7 @@ test entry-6.8 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Helvetica -24} -bd 3 -relief raised -width 0
.e insert end "01234567"
@@ -1852,7 +1852,7 @@ test entry-6.9 {EntryComputeGeometry procedure} -constraints {
fonts
} -setup {
entry .e -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -font {Helvetica -24} -bd 3 -relief raised -width 0
update
@@ -1864,7 +1864,7 @@ test entry-6.10 {EntryComputeGeometry procedure} -constraints {
unix fonts
} -setup {
entry .e -highlightthickness 2 -font {Helvetica -12}
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -bd 1 -relief raised -width 0 -show .
.e insert 0 12345
@@ -1881,7 +1881,7 @@ test entry-6.11 {EntryComputeGeometry procedure} -constraints {
win
} -setup {
entry .e -highlightthickness 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -bd 1 -relief raised -width 0 -show . -font {helvetica 12}
.e insert 0 12345
@@ -1905,7 +1905,7 @@ test entry-6.12 {EntryComputeGeometry procedure} -constraints {
} -setup {
catch {destroy .e}
entry .e -font {Courier -12} -bd 2 -relief raised -width 20
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert end "012\t456\t"
update
@@ -1918,7 +1918,7 @@ test entry-6.12 {EntryComputeGeometry procedure} -constraints {
test entry-7.1 {InsertChars procedure} -setup {
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
@@ -1935,7 +1935,7 @@ test entry-7.1 {InsertChars procedure} -setup {
test entry-7.2 {InsertChars procedure} -setup {
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
@@ -1950,7 +1950,7 @@ test entry-7.2 {InsertChars procedure} -setup {
} -result {abcdeXXX abcdeXXX {0.000000 1.000000}}
test entry-7.3 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 0123456789
.e select from 2
@@ -1964,7 +1964,7 @@ test entry-7.3 {InsertChars procedure} -setup {
} -result {5 9 5 8}
test entry-7.4 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 0123456789
.e select from 2
@@ -1978,7 +1978,7 @@ test entry-7.4 {InsertChars procedure} -setup {
} -result {2 9 2 8}
test entry-7.5 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 0123456789
.e select from 2
@@ -1992,7 +1992,7 @@ test entry-7.5 {InsertChars procedure} -setup {
} -result {2 9 2 8}
test entry-7.6 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 0123456789
.e select from 2
@@ -2006,7 +2006,7 @@ test entry-7.6 {InsertChars procedure} -setup {
} -result {2 6 2 5}
test entry-7.7 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -xscrollcommand scroll
.e insert 0 0123456789
@@ -2018,7 +2018,7 @@ test entry-7.7 {InsertChars procedure} -setup {
} -result 7
test entry-7.8 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 0123456789
.e icursor 4
@@ -2029,7 +2029,7 @@ test entry-7.8 {InsertChars procedure} -setup {
} -result 4
test entry-7.9 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 "This is a very long string"
update
@@ -2041,7 +2041,7 @@ test entry-7.9 {InsertChars procedure} -setup {
} -result 7
test entry-7.10 {InsertChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 "This is a very long string"
update
@@ -2056,7 +2056,7 @@ test entry-7.11 {InsertChars procedure} -constraints {
fonts
} -setup {
entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 "xyzzy"
update
@@ -2069,7 +2069,7 @@ test entry-7.11 {InsertChars procedure} -constraints {
test entry-8.1 {DeleteChars procedure} -setup {
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
@@ -2085,7 +2085,7 @@ test entry-8.1 {DeleteChars procedure} -setup {
test entry-8.2 {DeleteChars procedure} -setup {
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
@@ -2101,7 +2101,7 @@ test entry-8.2 {DeleteChars procedure} -setup {
test entry-8.3 {DeleteChars procedure} -setup {
unset -nocomplain contents
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e configure -textvariable contents -xscrollcommand scroll
@@ -2116,7 +2116,7 @@ test entry-8.3 {DeleteChars procedure} -setup {
} -result {abc abc {0.000000 1.000000}}
test entry-8.4 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 0123456789abcde
@@ -2132,7 +2132,7 @@ test entry-8.4 {DeleteChars procedure} -setup {
} -result {1 6 1 5}
test entry-8.5 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 0123456789abcde
@@ -2148,7 +2148,7 @@ test entry-8.5 {DeleteChars procedure} -setup {
} -result {1 5 1 4}
test entry-8.6 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 0123456789abcde
@@ -2164,7 +2164,7 @@ test entry-8.6 {DeleteChars procedure} -setup {
} -result {1 2 1 5}
test entry-8.7 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 0123456789abcde
@@ -2178,7 +2178,7 @@ test entry-8.7 {DeleteChars procedure} -setup {
} -returnCodes error -result {selection isn't in widget .e}
test entry-8.8 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 0123456789abcde
@@ -2194,7 +2194,7 @@ test entry-8.8 {DeleteChars procedure} -setup {
} -result {3 4 3 8}
test entry-8.9 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 0123456789abcde
.e select from 3
@@ -2207,7 +2207,7 @@ test entry-8.9 {DeleteChars procedure} -setup {
} -returnCodes error -result {selection isn't in widget .e}
test entry-8.10 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 0123456789abcde
@@ -2223,7 +2223,7 @@ test entry-8.10 {DeleteChars procedure} -setup {
} -result {3 5 5 8}
test entry-8.11 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 0123456789abcde
@@ -2239,7 +2239,7 @@ test entry-8.11 {DeleteChars procedure} -setup {
} -result {3 8 4 8}
test entry-8.12 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 0123456789abcde
@@ -2252,7 +2252,7 @@ test entry-8.12 {DeleteChars procedure} -setup {
} -result 1
test entry-8.13 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 0123456789abcde
@@ -2265,7 +2265,7 @@ test entry-8.13 {DeleteChars procedure} -setup {
} -result 1
test entry-8.14 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 0123456789abcde
@@ -2278,7 +2278,7 @@ test entry-8.14 {DeleteChars procedure} -setup {
} -result 4
test entry-8.15 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 "This is a very long string"
@@ -2291,7 +2291,7 @@ test entry-8.15 {DeleteChars procedure} -setup {
} -result 1
test entry-8.16 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 "This is a very long string"
@@ -2304,7 +2304,7 @@ test entry-8.16 {DeleteChars procedure} -setup {
} -result 1
test entry-8.17 {DeleteChars procedure} -setup {
entry .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 "This is a very long string"
@@ -2317,7 +2317,7 @@ test entry-8.17 {DeleteChars procedure} -setup {
} -result 4
test entry-8.18 {DeleteChars procedure} -constraints failsOnUbuntuNoXft -setup {
entry .e -width 0 -font {Courier -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
focus .e
} -body {
.e insert 0 "xyzzy"
@@ -2346,7 +2346,7 @@ test entry-10.1 {EntrySetValue procedure} -constraints fonts -body {
set x abcde
set y ab
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2 -width 0
- pack .e
+ pack .e ; update idletasks
.e configure -textvariable x
.e configure -textvariable y
update
@@ -2357,7 +2357,7 @@ test entry-10.1 {EntrySetValue procedure} -constraints fonts -body {
test entry-10.2 {EntrySetValue procedure, updating selection} -setup {
unset -nocomplain x
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -textvariable x
.e insert 0 "abcdefghjklmnopqrstu"
@@ -2370,7 +2370,7 @@ test entry-10.2 {EntrySetValue procedure, updating selection} -setup {
test entry-10.3 {EntrySetValue procedure, updating selection} -setup {
unset -nocomplain x
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -textvariable x
.e insert 0 "abcdefghjklmnopqrstu"
@@ -2383,7 +2383,7 @@ test entry-10.3 {EntrySetValue procedure, updating selection} -setup {
test entry-10.4 {EntrySetValue procedure, updating selection} -setup {
unset -nocomplain x
entry .e -font {Helvetica -12} -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -textvariable x
.e insert 0 "abcdefghjklmnopqrstu"
@@ -2396,7 +2396,7 @@ test entry-10.4 {EntrySetValue procedure, updating selection} -setup {
test entry-10.5 {EntrySetValue procedure, updating display position} -setup {
unset -nocomplain x
entry .e -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
@@ -2411,10 +2411,10 @@ test entry-10.5 {EntrySetValue procedure, updating display position} -setup {
test entry-10.6 {EntrySetValue procedure, updating display position} -setup {
unset -nocomplain x
entry .e -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
- pack .e
+ pack .e ; update idletasks
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
.e xview 10
update
@@ -2427,11 +2427,11 @@ test entry-10.6 {EntrySetValue procedure, updating display position} -setup {
test entry-10.7 {EntrySetValue procedure, updating insertion cursor} -setup {
unset -nocomplain x
entry .e -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
- pack .e
+ pack .e ; update idletasks
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
.e icursor 5
set x "123"
@@ -2442,10 +2442,10 @@ test entry-10.7 {EntrySetValue procedure, updating insertion cursor} -setup {
test entry-10.8 {EntrySetValue procedure, updating insertion cursor} -setup {
unset -nocomplain x
entry .e -highlightthickness 2 -bd 2
- pack .e
+ pack .e ; update idletasks
} -body {
.e configure -width 10 -font {Courier -12} -textvariable x
- pack .e
+ pack .e ; update idletasks
.e insert 0 "abcdefghjklmnopqrstuvwxyz"
.e icursor 5
set x "123456"
@@ -2456,7 +2456,7 @@ test entry-10.8 {EntrySetValue procedure, updating insertion cursor} -setup {
test entry-11.1 {EntryEventProc procedure} -setup {
entry .e -highlightthickness 2 -bd 2 -font {Helvetica -12}
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 abcdefg
destroy .e
@@ -2488,7 +2488,7 @@ test entry-12.1 {EntryCmdDeletedProc procedure} -body {
test entry-13.1 {GetEntryIndex procedure} -setup {
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 012345678901234567890
.e xview 4
@@ -2505,7 +2505,7 @@ test entry-13.2 {GetEntryIndex procedure} -body {
} -returnCodes error -result {bad entry index "abogus"}
test entry-13.3 {GetEntryIndex procedure} -setup {
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 012345678901234567890
.e xview 4
@@ -2518,7 +2518,7 @@ test entry-13.3 {GetEntryIndex procedure} -setup {
} -result 1
test entry-13.4 {GetEntryIndex procedure} -setup {
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 012345678901234567890
.e xview 4
@@ -2531,7 +2531,7 @@ test entry-13.4 {GetEntryIndex procedure} -setup {
} -result 4
test entry-13.5 {GetEntryIndex procedure} -setup {
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 012345678901234567890
.e xview 4
@@ -2552,7 +2552,7 @@ test entry-13.6 {GetEntryIndex procedure} -setup {
} -returnCodes error -result {bad entry index "ebogus"}
test entry-13.7 {GetEntryIndex procedure} -setup {
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 012345678901234567890
.e xview 4
@@ -2571,7 +2571,7 @@ test entry-13.8 {GetEntryIndex procedure} -setup {
} -returnCodes error -result {bad entry index "ibogus"}
test entry-13.9 {GetEntryIndex procedure} -setup {
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
} -body {
.e insert 0 012345678901234567890
.e xview 4
@@ -2593,7 +2593,7 @@ test entry-13.10 {GetEntryIndex procedure} -constraints x11 -body {
# selection range is reset.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2613,7 +2613,7 @@ test entry-13.11 {GetEntryIndex procedure} -constraints aquaOrWin32 -body {
# entry, the old range will be rehighlighted.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2631,7 +2631,7 @@ test entry-13.11 {GetEntryIndex procedure} -constraints aquaOrWin32 -body {
test entry-13.12 {GetEntryIndex procedure} -constraints x11 -body {
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2650,7 +2650,7 @@ test entry-13.12 {GetEntryIndex procedure} -constraints x11 -body {
test entry-13.12.1 {GetEntryIndex procedure} -constraints unix -body {
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2667,7 +2667,7 @@ test entry-13.12.1 {GetEntryIndex procedure} -constraints unix -body {
test entry-13.13 {GetEntryIndex procedure} -constraints win -body {
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2687,7 +2687,7 @@ test entry-13.14 {GetEntryIndex procedure} -constraints win -body {
# entry, the old range will be rehighlighted.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2707,7 +2707,7 @@ test entry-13.14.1 {GetEntryIndex procedure} -constraints win -body {
# entry, the old range will be rehighlighted.
# Previous settings:
entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2733,7 +2733,7 @@ test entry-13.15 {GetEntryIndex procedure} -body {
test entry-13.16 {GetEntryIndex procedure} -constraints fonts -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2744,7 +2744,7 @@ test entry-13.16 {GetEntryIndex procedure} -constraints fonts -body {
test entry-13.17 {GetEntryIndex procedure} -constraints fonts -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2755,7 +2755,7 @@ test entry-13.17 {GetEntryIndex procedure} -constraints fonts -body {
test entry-13.18 {GetEntryIndex procedure} -constraints fonts -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2766,7 +2766,7 @@ test entry-13.18 {GetEntryIndex procedure} -constraints fonts -body {
test entry-13.19 {GetEntryIndex procedure} -constraints fonts -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2777,7 +2777,7 @@ test entry-13.19 {GetEntryIndex procedure} -constraints fonts -body {
test entry-13.20 {GetEntryIndex procedure} -constraints fonts -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2788,7 +2788,7 @@ test entry-13.20 {GetEntryIndex procedure} -constraints fonts -body {
test entry-13.21 {GetEntryIndex procedure} -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2798,7 +2798,7 @@ test entry-13.21 {GetEntryIndex procedure} -body {
} -result 9
test entry-13.22 {GetEntryIndex procedure} -setup {
entry .e
- pack .e
+ pack .e ; update idletasks
update
} -body {
.e index 1xyz
@@ -2808,7 +2808,7 @@ test entry-13.22 {GetEntryIndex procedure} -setup {
test entry-13.23 {GetEntryIndex procedure} -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2819,7 +2819,7 @@ test entry-13.23 {GetEntryIndex procedure} -body {
test entry-13.24 {GetEntryIndex procedure} -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2830,7 +2830,7 @@ test entry-13.24 {GetEntryIndex procedure} -body {
test entry-13.25 {GetEntryIndex procedure} -body {
entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\
-font {Courier -12}
- pack .e
+ pack .e ; update idletasks
.e insert 0 012345678901234567890
.e xview 4
update
@@ -2843,7 +2843,7 @@ test entry-13.26 {GetEntryIndex procedure} -constraints fonts -body {
selection clear .e
.e configure -show .
.e insert 0 XXXYZZY
- pack .e
+ pack .e ; update idletasks
update
list [.e index @7] [.e index @8]
} -cleanup {
@@ -2903,7 +2903,7 @@ test entry-15.1 {EntryLostSelection} -body {
# is scrollcommand needed here??
test entry-16.1 {EntryVisibleRange procedure} -constraints fonts -body {
entry .e -width 10 -font {Helvetica -12}
- pack .e
+ pack .e ; update idletasks
update
.e insert 0 "............................."
format {%.6f %.6f} {*}[.e xview]
@@ -2914,7 +2914,7 @@ test entry-16.2 {EntryVisibleRange procedure} -constraints {
unix fonts
} -body {
entry .e -show X -width 10 -font {Helvetica -12}
- pack .e
+ pack .e ; update idletasks
update
.e insert 0 "............................."
format {%.6f %.6f} {*}[.e xview]
@@ -2925,7 +2925,7 @@ test entry-16.3 {EntryVisibleRange procedure} -constraints {
win
} -body {
entry .e -show . -width 10 -font {Helvetica -12}
- pack .e
+ pack .e ; update idletasks
update
.e insert 0 XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
format {%.6f %.6f} {*}[.e xview]
@@ -2942,7 +2942,7 @@ test entry-16.4 {EntryVisibleRange procedure} -body {
test entry-17.1 {EntryUpdateScrollbar procedure} -body {
entry .e -width 10 -xscrollcommand scroll -font {Courier -12}
- pack .e
+ pack .e ; update idletasks
update idletasks
set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e delete 0 end
@@ -2955,7 +2955,7 @@ test entry-17.1 {EntryUpdateScrollbar procedure} -body {
} -result {0.000000 1.000000}
test entry-17.2 {EntryUpdateScrollbar procedure} -body {
entry .e -width 10 -xscrollcommand scroll -font {Courier -12}
- pack .e
+ pack .e ; update idletasks
set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 0 0123456789abcdef
.e xview 3
@@ -2967,7 +2967,8 @@ test entry-17.2 {EntryUpdateScrollbar procedure} -body {
} -result {0.187500 0.812500}
test entry-17.3 {EntryUpdateScrollbar procedure} -body {
entry .e -width 10 -xscrollcommand scroll -font {Courier -12}
- pack .e
+ pack .e ; update idletasks
+ update idletasks
set timeout [after 500 {set scrollInfo {-1000000 -1000000}}]
.e insert 0 abcdefghijklmnopqrs
.e xview 6
@@ -2984,7 +2985,7 @@ test entry-17.4 {EntryUpdateScrollbar procedure} -setup {
}
} -body {
entry .e -width 5
- pack .e
+ pack .e ; update idletasks
update idletasks
.e configure -xscrollcommand thisisnotacommand
vwait x
@@ -3027,7 +3028,7 @@ test entry-19.1 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert 0 a
set ::vVals
} -cleanup {
@@ -3042,7 +3043,7 @@ test entry-19.2 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert 0 a ;# previous settings
.e insert 1 b
return $::vVals
@@ -3058,7 +3059,7 @@ test entry-19.3 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert 0 ab ;# previous settings
.e insert end c
set ::vVals
@@ -3074,7 +3075,7 @@ test entry-19.4 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert 0 abc ;# previous settings
.e insert 1 123
list $::vVals $::e
@@ -3090,7 +3091,7 @@ test entry-19.5 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert 0 a123bc ;# previous settings
.e delete 2
set ::vVals
@@ -3106,7 +3107,7 @@ test entry-19.6 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert 0 a13bc ;# previous settings
.e configure -validate key
.e delete 1 3
@@ -3123,7 +3124,7 @@ test entry-19.7 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert end abc ;# previous settings
set ::vVals {}
.e insert end d
@@ -3140,7 +3141,7 @@ test entry-19.8 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e configure -validate focus ;# previous settings
.e insert end abcd ;# previous settings
focus -force .e
@@ -3159,7 +3160,7 @@ test entry-19.9 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert end abcd ;# previous settings
focus -force .e ;# previous settings
update ;# previous settings
@@ -3180,7 +3181,7 @@ test entry-19.10 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert end abcd ;# previous settings
focus -force .e
# update necessary to process FocusIn event
@@ -3198,7 +3199,7 @@ test entry-19.11 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert end abcd ;# previous settings
focus -force .e ;# previous settings
# update necessary to process FocusIn event
@@ -3219,7 +3220,7 @@ test entry-19.12 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert 0 abcd ;# previous settings
focus -force .e
# update necessary to process FocusIn event
@@ -3237,7 +3238,7 @@ test entry-19.13 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert end abcd ;# previous settings
set ::vVals {}
focus -force .
@@ -3256,7 +3257,7 @@ test entry-19.14 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert end abcd ;# previous settings
set ::vVals {} ;# previous settings
focus -force .e
@@ -3275,7 +3276,7 @@ test entry-19.15 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert end abcd ;# previous settings
set ::vVals {} ;# previous settings
focus -force .e ;# previous settings
@@ -3298,7 +3299,7 @@ test entry-19.16 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert end abcd ;# previous settings
set ::vVals {} ;# previous settings
focus -force .e ;# previous settings
@@ -3321,7 +3322,7 @@ test entry-19.17 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
.e insert end abcd ;# previous settings
set ::e newdata
list [.e cget -validate] $::vVals
@@ -3339,7 +3340,7 @@ test entry-19.18 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
set ::e newdata ;# previous settings
.e configure -validate all
set ::e nextdata
@@ -3359,7 +3360,7 @@ test entry-19.19 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
set ::e nextdata ;# previous settings
.e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V]
@@ -3382,7 +3383,7 @@ test entry-19.20 {entry widget validation} -setup {
-invalidcommand bell \
-textvariable ::e \
-background red -foreground white
- pack .e
+ pack .e ; update idletasks
set ::e nextdata ;# previous settings
.e configure -validatecommand [list doval2 %W %d %i %P %s %S %v %V] ;# prev
.e validate ;# previous settings
@@ -3405,7 +3406,7 @@ test entry-19.21 {entry widget validation - bug 40e4bf6198} -setup {
entry .e -validate key \
-validatecommand [list doval2 %W %d %i %P %s %S %v %V] \
-textvariable ::e
- pack .e
+ pack .e ; update idletasks
set ::e origdata
.e insert 0 A
list [.e cget -validate] [.e get] $::e $::vVals
diff --git a/tests/font.test b/tests/font.test
index 6995a7b..5af2dbb 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -523,16 +523,16 @@ test font-12.2 {UpdateDependantFonts procedure: pings the widgets} -setup {
destroy .t.f
catch {font delete xyz}
pack [label .t.f]
- update
+ update idletasks
} -body {
font create xyz -family times -size 20
.t.f config -font xyz -text "abcd" -padx 0 -bd 0 -highlightthickness 0
set a1 [font measure xyz "abcd"]
- update
+ update idletasks
set b1 [winfo reqwidth .t.f]
font configure xyz -family helvetica -size 20
set a2 [font measure xyz "abcd"]
- update
+ update idletasks
set b2 [winfo reqwidth .t.f]
expr {$a1==$b1 && $a2==$b2}
} -cleanup {
diff --git a/tests/scale.test b/tests/scale.test
index 34f2cd9..6e62710 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -1473,17 +1473,18 @@ test scale-20.3 {Bug [2262543fff] - Scale widget unexpectedly fires command call
test scale-20.4 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 4} -setup {
catch {destroy .s}
set res {}
- set commandedVar -1
} -body {
scale .s -from 1 -to 50 -command {set commandedVar}
- .s set 10
pack .s
+ update idletasks
+ .s set 10
set timeout [after 500 {set $commandedVar "timeout"}]
+ set commandedVar -1
vwait commandedVar ; # -command callback shall fire
set res [list [.s get] $commandedVar]
} -cleanup {
- destroy .s
after cancel $timeout
+ destroy .s
} -result {10 10}
test scale-20.5 {Bug [2262543fff] - Scale widget unexpectedly fires command callback, case 5} -setup {
catch {destroy .s}
@@ -1492,6 +1493,7 @@ test scale-20.5 {Bug [2262543fff] - Scale widget unexpectedly fires command call
} -body {
scale .s -from 1 -to 50
pack .s
+ update idletasks
.s set 10
.s configure -command {set commandedVar}
update ; # -command callback shall NOT fire
@@ -1506,6 +1508,7 @@ test scale-20.6 {Bug [2262543fff] - Scale widget unexpectedly fires command call
} -body {
scale .s -from 1 -to 50
pack .s
+ update idletasks
.s configure -command {set commandedVar}
.s set 10
set timeout [after 500 {set $commandedVar "timeout"}]
@@ -1522,6 +1525,7 @@ test scale-20.7 {Bug [2262543fff] - Scale widget unexpectedly fires command call
} -body {
scale .s -from 1 -to 50 -command {set commandedVar}
pack .s
+ update idletasks
.s set 10
set timeout [after 500 {set $commandedVar "timeout"}]
vwait commandedVar ; # -command callback shall fire
@@ -1538,6 +1542,7 @@ test scale-20.8 {Bug [2262543fff] - Scale widget unexpectedly fires command call
} -body {
scale .s -from 1 -to 50 -variable scaleVar -command {set commandedVar}
pack .s
+ update idletasks
.s set 10
set timeout [after 500 {set $commandedVar "timeout"}]
vwait commandedVar ; # -command callback shall fire
diff --git a/tests/textWind.test b/tests/textWind.test
index a11a418..5b99126 100644
--- a/tests/textWind.test
+++ b/tests/textWind.test
@@ -1406,7 +1406,7 @@ test textWind-17.1 {peer widgets and embedded windows} -setup {
.t window create 1.3 -window .f
toplevel .tt
pack [.t peer create .tt.t]
- update ; update
+ update
destroy .t .tt
winfo exists .f
} -result {0}
@@ -1420,7 +1420,7 @@ test textWind-17.2 {peer widgets and embedded windows} -setup {
.t window create 1.4 -window .f
toplevel .tt
pack [.t peer create .tt.t]
- update ; update
+ update
destroy .t
.tt.t insert 1.0 "foo"
update
@@ -1435,7 +1435,7 @@ test textWind-17.3 {peer widget and -create} -setup {
.t insert 1.0 "Some sample text"
toplevel .tt
pack [.t peer create .tt.t]
- update ; update
+ update
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
update
destroy .t .tt
@@ -1451,7 +1451,7 @@ test textWind-17.4 {peer widget deleted one window shouldn't delete others} -set
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
- update ; update
+ update
destroy .tt
lappend res [.t get 1.2]
update
@@ -1469,7 +1469,7 @@ test textWind-17.5 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
- update ; update
+ update
list [.t window cget 1.2 -window] [.tt.t window cget 1.2 -window]
} -cleanup {
destroy .tt .t
@@ -1484,7 +1484,7 @@ test textWind-17.6 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -create {frame %W.f -width 10 -height 20 -bg blue}
- update ; update
+ update
list [.t window configure 1.2 -window] \
[.tt.t window configure 1.2 -window]
} -cleanup {
@@ -1500,7 +1500,7 @@ test textWind-17.7 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
- update ; update
+ update
list [.t window cget 1.2 -window] [.tt.t window cget 1.2 -window]
} -cleanup {
destroy .tt .t
@@ -1515,7 +1515,7 @@ test textWind-17.8 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
- update ; update
+ update
list [.t window configure 1.2 -window] \
[.tt.t window configure 1.2 -window]
} -cleanup {
@@ -1531,7 +1531,7 @@ test textWind-17.9 {peer widget window configuration} -setup {
toplevel .tt
pack [.t peer create .tt.t]
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
- update ; update
+ update
.tt.t window configure 1.2 -window [frame .tt.t.f -width 10 -height 20 -bg red]
list [.t window configure 1.2 -window] [.tt.t window configure 1.2 -window]
} -cleanup {
@@ -1541,26 +1541,34 @@ test textWind-17.9 {peer widget window configuration} -setup {
test textWind-17.10 {peer widget window configuration} -setup {
destroy .t .tt
} -body {
+ set res {}
pack [text .t]
.t delete 1.0 end
.t insert 1.0 "Some sample text"
toplevel .tt
pack [.t peer create .tt.t]
+ update idletasks
.t window create 1.2 -window [frame .t.f -width 10 -height 20 -bg blue]
+ update idletasks
+ # There should be a window in the main widget but not in the peer.
+ lappend res [.t window configure 1.2 -window]
+ lappend res [.tt.t window configure 1.2 -window]
.tt.t window create 1.2 -window [frame .tt.t.f -width 25 -height 20 -bg blue]
- update ; update
- .t window configure 1.2 -create \
- {destroy %W.f ; frame %W.f -width 50 -height 7 -bg red}
- .tt.t window configure 1.2 -window {}
+ update idletasks
+ .t window configure 1.2 -create {destroy %W.f ; frame %W.f -width 50 -height 7 -bg red}
+ update idletasks
+ # The main widget should not have changed.
+ lappend res [.t window configure 1.2 -window]
.t window configure 1.2 -window {}
- set res [list [.t window configure 1.2 -window] \
- [.tt.t window configure 1.2 -window]]
+ .tt.t window configure 1.2 -window {}
update
- lappend res [.t window configure 1.2 -window] \
- [.tt.t window configure 1.2 -window]
+ # Nothing should have changed.
+ lappend res [.t window configure 1.2 -window]
+ lappend res [.tt.t window configure 1.2 -window]
} -cleanup {
destroy .tt .t
-} -result {{-window {} {} {} {}} {-window {} {} {} {}} {-window {} {} {} .t.f} {-window {} {} {} .tt.t.f}}
+} -result {{-window {} {} {} .t.f} {-window {} {} {} {}} {-window {} {} {} .t.f}\
+{-window {} {} {} .t.f} {-window {} {} {} .tt.t.f}}
test textWind-18.1 {embedded window deletion triggered by a script bound to <Map>} -setup {
catch {destroy .t .f .f2}
diff --git a/tests/ttk/spinbox.test b/tests/ttk/spinbox.test
index cd3b2ce..8656d9d 100644
--- a/tests/ttk/spinbox.test
+++ b/tests/ttk/spinbox.test
@@ -138,14 +138,18 @@ test spinbox-1.8.3 "option -validate" -setup {
} -returnCodes error -result {bad validate "bogus": must be all, key, focus, focusin, focusout, or none}
test spinbox-1.8.4 "-validate option: " -setup {
- set ::spinbox_test {}
ttk::spinbox .sb -from 0 -to 100
+ set ::spinbox_test {}
} -body {
- .sb configure -validate all -validatecommand {lappend ::spinbox_test %P}
+ .sb configure -validate all -validatecommand {set ::spinbox_test %P}
pack .sb
+ update idletasks
.sb set 50
focus -force .sb
- after 500 {set ::spinbox_wait 1} ; vwait ::spinbox_wait
+ set ::spinbox_wait 0
+ set timer [after 100 {set ::spinbox_wait 1}]
+ vwait ::spinbox_wait
+ after cancel $timer
set ::spinbox_test
} -cleanup {
destroy .sb
diff --git a/tests/ttk/validate.test b/tests/ttk/validate.test
index 5430903..61e7c2c 100644
--- a/tests/ttk/validate.test
+++ b/tests/ttk/validate.test
@@ -78,54 +78,63 @@ test validate-1.7 {entry widget validation - vmode focus} -body {
} -result {}
test validate-1.8 {entry widget validation - vmode focus} -body {
+ set ::vVals {}
+ set timer [after 300 lappend ::vVals timeout]
focus -force .e
- # update necessary to process FocusIn event
- update
+ vwait ::vVals
+ after cancel $timer
set ::vVals
} -result {.e -1 -1 abcd abcd {} focus focusin}
test validate-1.9 {entry widget validation - vmode focus} -body {
+ set ::vVals {}
+ set timer [after 300 lappend ::vVals timeout]
focus -force .
- # update necessary to process FocusOut event
- update
+ vwait ::vVals
+ after cancel $timer
set ::vVals
} -result {.e -1 -1 abcd abcd {} focus focusout}
.e configure -validate all
test validate-1.10 {entry widget validation - vmode all} -body {
+ set ::vVals {}
+ set timer [after 300 lappend ::vVals timeout]
focus -force .e
- # update necessary to process FocusIn event
- update
+ vwait ::vVals
+ after cancel $timer
set ::vVals
} -result {.e -1 -1 abcd abcd {} all focusin}
test validate-1.11 {entry widget validation} -body {
+ set ::vVals {}
+ set timer [after 300 lappend ::vVals timeout]
focus -force .
- # update necessary to process FocusOut event
- update
+ vwait ::vVals
+ after cancel $timer
set ::vVals
} -result {.e -1 -1 abcd abcd {} all focusout}
.e configure -validate focusin
test validate-1.12 {entry widget validation} -body {
+ set ::vVals {}
+ set timer [after 300 lappend ::vVals timeout]
focus -force .e
- # update necessary to process FocusIn event
- update
+ vwait ::vVals
+ after cancel $timer
set ::vVals
} -result {.e -1 -1 abcd abcd {} focusin focusin}
test validate-1.13 {entry widget validation} -body {
set ::vVals {}
focus -force .
- # update necessary to process FocusOut event
update
set ::vVals
} -result {}
.e configure -validate focuso
test validate-1.14 {entry widget validation} -body {
+ set ::vVals {}
focus -force .e
- # update necessary to process FocusIn event
update
set ::vVals
} -result {}
diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test
index bb7edc5..d5f6ee3 100644
--- a/tests/unixEmbed.test
+++ b/tests/unixEmbed.test
@@ -1301,6 +1301,7 @@ test unixEmbed-11.2 {mouse coordinates in embedded toplevels} -constraints {
wm geometry .main 200x400+100+100
update idletasks
focus -force .main
+ after 100
set x [expr {[winfo x .main ] + [winfo x .main.b] + 40}]
set y [expr {[winfo y .main ] + [winfo y .main.b] + 38}]
lappend result [winfo containing $x $y]
diff --git a/unix/configure b/unix/configure
index 45c215e..691d43b 100755
--- a/unix/configure
+++ b/unix/configure
@@ -9385,7 +9385,7 @@ cat >>confdefs.h <<\_ACEOF
#define MAC_OSX_TK 1
_ACEOF
- LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit"
+ LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit -framework QuartzCore"
EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c'
TK_WINDOWINGSYSTEM=AQUA
if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then
diff --git a/unix/configure.in b/unix/configure.in
index 78dd688..9720b91 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -354,7 +354,7 @@ fi
if test $tk_aqua = yes; then
AC_DEFINE(MAC_OSX_TK, 1, [Are we building TkAqua?])
- LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit"
+ LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit -framework QuartzCore"
EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c'
TK_WINDOWINGSYSTEM=AQUA
if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then