diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-10 17:07:39 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-10 17:07:39 (GMT) |
commit | a00b21d9d23ab71425a8ced3999c4c30f1639869 (patch) | |
tree | cc98bb7eb4a5b2f94edfb64deb0a1e158d9af90b /generic/tkTest.c | |
parent | ae6c3c15f60d72b35c871fbfc3f29269c2a3405b (diff) | |
download | tk-a00b21d9d23ab71425a8ced3999c4c30f1639869.zip tk-a00b21d9d23ab71425a8ced3999c4c30f1639869.tar.gz tk-a00b21d9d23ab71425a8ced3999c4c30f1639869.tar.bz2 |
Use TIP #613 to improve error-messages in Tk
Diffstat (limited to 'generic/tkTest.c')
-rw-r--r-- | generic/tkTest.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tkTest.c b/generic/tkTest.c index f89a946..1ed475a 100644 --- a/generic/tkTest.c +++ b/generic/tkTest.c @@ -573,6 +573,7 @@ TestobjconfigObjCmd( Tcl_Obj *doublePtr; Tcl_Obj *stringPtr; Tcl_Obj *stringTablePtr; + Tcl_Obj *stringTablePtr2; Tcl_Obj *colorPtr; Tcl_Obj *fontPtr; Tcl_Obj *bitmapPtr; @@ -590,6 +591,9 @@ TestobjconfigObjCmd( static const char *const stringTable[] = { "one", "two", "three", "four", NULL }; + static const char *const stringTable2[] = { + "one", "two", NULL + }; static const Tk_OptionSpec typesSpecs[] = { {TK_OPTION_BOOLEAN, "-boolean", "boolean", "Boolean", "1", offsetof(TypesRecord, booleanPtr), TCL_INDEX_NONE, 0, 0, 0x1}, @@ -604,6 +608,10 @@ TestobjconfigObjCmd( "-stringtable", "StringTable", "stringTable", "one", offsetof(TypesRecord, stringTablePtr), TCL_INDEX_NONE, TK_CONFIG_NULL_OK, stringTable, 0x10}, + {TK_OPTION_STRING_TABLE, + "-stringtable2", "StringTable2", "stringTable2", + "two", offsetof(TypesRecord, stringTablePtr2), TCL_INDEX_NONE, + TK_CONFIG_NULL_OK, stringTable2, 0x10}, {TK_OPTION_COLOR, "-color", "color", "Color", "red", offsetof(TypesRecord, colorPtr), TCL_INDEX_NONE, TK_CONFIG_NULL_OK, "black", 0x20}, @@ -668,6 +676,7 @@ TestobjconfigObjCmd( recordPtr->pixelPtr = NULL; recordPtr->mmPtr = NULL; recordPtr->stringTablePtr = NULL; + recordPtr->stringTablePtr2 = NULL; recordPtr->customPtr = NULL; result = Tk_InitOptions(interp, recordPtr, optionTable, tkwin); |