.
D 2010-12-01T12:30:50
J assignee dgp
J cmimetype text/plain
J comment Here\sare\stwo\spatches,\swhich\stogether\ssimply\swinMain.c,\seliminating\nmost\sof\sthe\swin32-specific\scode\sfrom\sit\s(everything\sexcept\sthe\sdifferent\nentry\spoint\sand\sthe\ssetargv\sworkaround).\sThe\sneed\sfor\sthis\swin32-specific\ncode\swas\sthat\swish\swants\sto\sinstall\sa\spanic\sproc\sas\ssoon\sas\npossible,\sas\swin32\sgui\sapplications\sdon't\shave\sstdout/stderr.\sThis\sway,\nall\sembedders\sneed\sto\sdo\sthe\ssame\sfor\sgui-based\sapplication.\sMy\nproposal\sis\sto\smove\sthis\sto\sTk_Main().\sOn\sUNIX\sthere\sis\sno\schange.\n\nThe\spatch\sfor\sTcl,\smodifies\sTcl_FindExecutable()\s(the\sfirst\sfunction\sthat\nTk_Main\scalls)\ssuch\sthat\scalling\sTcl_FindExecutable(NULL)\sinstalls\na\spanicproc\sequivalent\sto\sthe\scurrent\sWishPanic().\sThis\sNULL\smust\nbe\sseen\sas\sa\smagic\svalue,\sany\sother\svalue\swould\sbe\sOK\stoo.\sOn\nWin32,\sthe\sargment\sis\sjust\sa\sdummy,\sso\sthis\sis\s100%\supwards\ncompatible.\n\nThe\spatch\sfor\sTk,\smodifies\sthe\sTk_Main\smacro\son\swin32\sto\scall\nTcl_FindExecutable(NULL)\sin\sstead\sof\sTcl_FindExecutable(argv0).\nThe\sonly\spotential\sincompatibility\soccurs\swhen\sembedders\scall\nTcl_SetPanicProc\sbefore\scalling\sTk_Main:\sThen\sthe\suser-\nsupplied\spanicproc\swill\sbe\sreplaced\sby\sthe\sstandard\spanic\sproc.\nworkaround:\sembedders\scan\scall\sTcl_SetPanicProc\sjust\sbefore\nTcl_Init(),\sthat\swill\swork\sin\searlier\sTcl\sversions\sas\swell.\n\nAnother\sminor\schange\sthis\spatch\smakes,\sis\schanging\nthe\sstring\s"Application\sinitialization\sfailed",\sto\n"application-specific\sinitialization\sfailed",\sso\sthe\nmessage\sis\sequal\sin\stclsh\sand\sin\swish.\sBut\smaybe\nanother\smessage\swould\sbe\sbetter.\n\nPlease,\sevaluate\sthis,\sif\sit\sis\ssuitable\sfor\sTcl8.6.\n\nRegards,\n\s\s\s\s\s\s\s\sJan\sNijtmans
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter nijtmans
J subsystem 50.\sEmbedding\sSupport
J title Move\sWishPanic\sfrom\sTk\sto\sTcl
J type Patch
K 3124554fffffffffffffffffffffffffffffffff
U nijtmans
Z 87b8452f3b90e748eca9be12e0710c41