Overview
| Artifact ID: | 6c31998236496765a392885667ee7fe47d700881 |
|---|---|
| Ticket: | 3124554fffffffffffffffffffffffffffffffff
Move WishPanic from Tk to Tcl |
| User & Date: | nijtmans on 2010-12-01 12:30:50 |
Changes
- assignee changed to: "dgp"
- cmimetype changed to: "text/plain"
- comment changed to:
Here are two patches, which together simply winMain.c, eliminating most of the win32-specific code from it (everything except the different entry point and the setargv workaround). The need for this win32-specific code was that wish wants to install a panic proc as soon as possible, as win32 gui applications don't have stdout/stderr. This way, all embedders need to do the same for gui-based application. My proposal is to move this to Tk_Main(). On UNIX there is no change. The patch for Tcl, modifies Tcl_FindExecutable() (the first function that Tk_Main calls) such that calling Tcl_FindExecutable(NULL) installs a panicproc equivalent to the current WishPanic(). This NULL must be seen as a magic value, any other value would be OK too. On Win32, the argment is just a dummy, so this is 100% upwards compatible. The patch for Tk, modifies the Tk_Main macro on win32 to call Tcl_FindExecutable(NULL) in stead of Tcl_FindExecutable(argv0). The only potential incompatibility occurs when embedders call Tcl_SetPanicProc before calling Tk_Main: Then the user- supplied panicproc will be replaced by the standard panic proc. workaround: embedders can call Tcl_SetPanicProc just before Tcl_Init(), that will work in earlier Tcl versions as well. Another minor change this patch makes, is changing the string "Application initialization failed", to "application-specific initialization failed", so the message is equal in tclsh and in wish. But maybe another message would be better. Please, evaluate this, if it is suitable for Tcl8.6. Regards, Jan Nijtmans - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nijtmans"
- subsystem changed to: "50. Embedding Support"
- title changed to: "Move WishPanic from Tk to Tcl"
- type changed to: "Patch"