We noticed that substitution of %P for an entry's validate command can create a command with an unmatched brace, which throws a tk error box onto the screen when the validate command is created with the "namespace code" method. The test script was executed with wish. The root cause appears to be how Tcl_ScanCountedElement does not return the correct flags for combinations of baskslash and braces. I believe that a command to validate a string should be able to execute without error on any string.
script that creates an error box
Tcl_ScanCountedElement() was significantly revised for
Tcl 8.5.10. Does that release still suffer the same problem?
confirmed this Tcl bug is already fixed in release 8.5.10