<i>Document Tcl's standard channels</i> status still Open with 4 other changes
by
.
D 2001-08-25T07:03:38
J icomment Logged\sIn:\sYES\s\nuser_id=80530\n\nThat\scovers\sthe\sbases\spretty\swell.\s\sI\shad\smissed\nthe\sdetail\sthat\sTcl_CreateChannel()\sonly\sfills\nNULL\sstandard\schannels\sthat\shave\spreviously\sbeen\ninitialized.\n\nA\sfew\splaces\syou\ssay\sthis\sinitialization\smust\sbe\ndone\sby\sa\scall\sto\sTcl_GetStdChannel(),\sbut\nTcl_SetStdChannel()\salso\sperforms\sthe\sinitialization.\n\nAnother\sproblem\sis\sthat\sthese\schanges\ssuggest\sthat\nstandard\schannel\sinitialization\swith\sa\nTcl_{Get|Set}StdChannel()\scall\scan\sonly\sbe\sdone\nby\sthe\sapplication.\s\sThe\sexample\sis\sTcl_Main's\ninitialization\sin\stclsh.\s\sBut\sthat\sis\snot\strue.\nEvery\scall\sto\sTcl_RegisterChannel()\sin\sa\snon-safe\ninterp\swill\scall\sTcl_GetStdChannel\sfor\sall\sthree\nstandard\schannels,\sso\sit\syou\shave\sany\schannel\sat\nall\sregistered\sin\san\sinterp,\syou\swill\shave\sthe\s\nstandard\schannels.\s\sAlso\severy\suse\sof\sthe\sone\sof\nthe\snames\sstd*\swhere\sa\schannel\sname\sis\sexpected\nwill\scause\sa\scall\sto\sTcl_GetStdChannel\sfor\sthat\nchannel,\sinitializing\sit\sif\sneeded.\s\sThere\sare\nother\splaces\stoo.\s\sThe\sapplication\scan't\sprevent\nit.\s\sThat's\swhy\sthe\sstd*\schannels\sare\sa\sfeature\nof\sthe\sTcl\slibrary,\snot\sonly\sthe\sapplication\stclsh.\n\nGiven\sthat\sTcl\swill\sinitialize\sthe\sstd\schannels\sas\nneeded\s(in\spossibly\ssurprising\sways\svia\sTcl_CreateChannel),\nwe\sneed\sto\sadvise\sapplication\swriters\sthat\nthey\sneed\sto\sinitialize\sthem\sthemselves,\sor\srisk\sTcl\nmaking\sa\sbad\schoice\sfor\sthem.\n\nA\srelated\smatter\sin\sTk\sis\swhere\sto\sdocument\nthe\smess\sthat\sis\sstandard\schannels\sfor\swish\son\nWindows.\n\n
J login dgp
J mimetype text/plain
J username dgp
K 402725ffffffffffffffffffffffffffffffffff
U dgp
Z 0afd537af515286a032c5eeae2bf059e