diff options
author | jenglish@flightlab.com <jenglish> | 2008-11-16 17:14:16 (GMT) |
---|---|---|
committer | jenglish@flightlab.com <jenglish> | 2008-11-16 17:14:16 (GMT) |
commit | 0b665a5f96ac317bcaca3d9debba6df056468319 (patch) | |
tree | 85462e1e5bc712fd9adae557c8182937658d0205 /generic/ttk | |
parent | c60921793284ac336691b4c138adeb1b99c1ee1f (diff) | |
download | tk-0b665a5f96ac317bcaca3d9debba6df056468319.zip tk-0b665a5f96ac317bcaca3d9debba6df056468319.tar.gz tk-0b665a5f96ac317bcaca3d9debba6df056468319.tar.bz2 |
Widget self-destruction is not necessarily an error [Bug 2298720].
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkEntry.c | 5 | ||||
-rw-r--r-- | generic/ttk/ttkWidget.c | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index ce07ed9..edf49a0 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1,5 +1,5 @@ /* - * $Id: ttkEntry.c,v 1.12 2008/11/09 23:53:09 jenglish Exp $ + * $Id: ttkEntry.c,v 1.13 2008/11/16 17:14:16 jenglish Exp $ * * DERIVED FROM: tk/generic/tkEntry.c r1.35. * @@ -1709,12 +1709,11 @@ typedef struct { {TK_OPTION_STRING, "-values", "values", "Values", \ "", Tk_Offset(Values, values.valuesObj), -1, 0, 0, VALUES_CHANGED} -static int +static void ValuesInitialize(Tcl_Interp *interp, void *recordPtr) { Values *valPtr = recordPtr; valPtr->values.currentIndex = -1; - return TCL_OK; } static int diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c index c2cb2b6..9f8e0a4 100644 --- a/generic/ttk/ttkWidget.c +++ b/generic/ttk/ttkWidget.c @@ -1,4 +1,4 @@ -/* $Id: ttkWidget.c,v 1.18 2008/11/13 01:13:54 jenglish Exp $ +/* $Id: ttkWidget.c,v 1.19 2008/11/16 17:14:16 jenglish Exp $ * Copyright (c) 2003, Joe English * * Core widget utilities. @@ -183,10 +183,6 @@ WidgetInstanceObjCmd( Tcl_Preserve(clientData); status = TtkWidgetEnsembleCommand(commands,1, interp,objc,objv,clientData); - if (WidgetDestroyed(corePtr)) { - status = TCL_ERROR; - Tcl_SetResult(interp, "Widget has been destroyed", TCL_STATIC); - } Tcl_Release(clientData); return status; @@ -664,6 +660,10 @@ Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], void *recordPtr) Tk_FreeSavedOptions(&savedOptions); status = corePtr->widgetSpec->postConfigureProc(interp,recordPtr,mask); + if (WidgetDestroyed(corePtr)) { + Tcl_SetResult(interp, "Widget has been destroyed", TCL_STATIC); + status = TCL_ERROR; + } if (status != TCL_OK) { return status; } |