<i>The "int" type registration should be restored.</i> status still Open with 3 other changes
by
.
D 2022-11-18T07:05:59.328
J icomment I'd\slike\sto\spoint\sout\sone\sreal\sworld\simpact\sof\sthis\schange.\r\n\r\nThere\sis\sone\scategory\sof\sextensions\sthat\sare\sgoing\sto\sbreak\s-\sthose\sinterfacing\sto\sother\slanguages\sthat\sare\styped\s(meaning\salmost\sall).\sThis\sincludes\stwapi,\stcom,\srl_json\sand\sprobably\sjacl\sthough\sI\shave\snot\schecked\sthe\slast.\sI'll\sdescribe\sthe\sissue\sin\sterms\sof\sWindows\sCOM.\r\n\r\nWhen\sinvoking\sa\sCOM\smethod\svia\sautomation\s(IDispatch),\sthe\sarguments\sare\sconstructed\sone\sof\stwo\sways\s\r\n\r\n1.\susing\sthe\scalled\scomponent's\stype\slibrary,\sor\r\n\r\n2.\sin\sthe\scase\swhere\sthe\scomponent\sdoes\snot\sprovide\sa\stype\slibrary,\sbased\son\sthe\sdata\stype\sat\sthe\scall\ssite.\sFor\sexample,\sin\sVB\s`foo(1)`\sand\s`foo("1")`\swill\spass\sthe\sargument\sas\sinteger\sand\sstring\srespectively.\r\n\r\nThe\sissue\swith\sinvoking\smethods\son\scomponents\sin\sthe\ssecond\scategory\sfrom\sTcl\sshould\sbe\sobvious\sas\s`[foo\s1]`\sprovides\sno\sinformation\sabout\sthe\stype\sof\sthe\sargument.\r\n\r\nHowever,\seven\scomponents\sin\sthe\sfirst\scategory,\sthat\sprovide\stype\slibraries,\ssuffer\sfrom\sthe\ssame\sissue\sfor\soverloaded\smethods\stake\ssimply\sdescribe\sthe\stype\sof\sthe\sargument\sas\s`VARIANT`\sand\sthen\stake\sdifferent\sactions\sbased\son\swhether\sthe\sargument\sis\sprovided\sas\san\sinteger\sor\s(for\sexample)\sstring.\sExcel\shas\sseveral\ssuch\smethods.\r\n\r\nThe\s"correct"\sway\sto\sdeal\swith\sthese\scases\sin\sTcl\sis\sto\ssupply\sarguments\sas\styped\svalues,\se.g.\s`foo\s[list\sint\s$val]`\sor\s`foo\s[list\sstring\s$val]`.\sHowever,\sthis\sis\snot\sonly\sinconvenient\sfor\sinteractive\suse,\sit\smakes\sit\sdifficult\sfor\sapplications\sand\slibraries\sthat\snow\shave\sto\sdeal\swith\sthe\ssame\svalue\srepresented\sin\snative\sTcl\sform\sand\sa\styped\sversion.\sThis\sis\sparticularly\spainful\sin\snested\sstructures.\sSo\sextensions\shave\smade\suse\s`Tcl_GetObjType`\sto\sguess\sthe\stype\sand\soffer\sa\s"casting"\smechanism\sthat\sonly\sneeds\sto\sbe\sused\sin\sspecial\scases.\sThis\shas\sworked\ssurprisingly\swell\sin\spractice.\r\n\r\nA\sgrep\son\smy\ssource\sbase\sshows\snsf,\sxotcl,\sjblend,\stwapi,\stcom,\srl_json\sand\stcllib\susing\s`Tcl_GetObjType`.\sThat\sdoes\snot\smean\sthey\sall\sbreak\swith\sthis\schange,\sI've\sonly\sverified\sthat\stwapi,\stcom\sand\srl_json\sare\saffected.\s\r\n\r\nNote\sthis\smeans\slayered\spackages\slike\sCAWT\s(on\stwapi)\sor\spandoc,\stcljupyter\s(for\srl_json)\sare\salso\s*potentially*\simpacted.\r\n\r\nI\sunderstand\sthat\sperhaps\s`Tcl_GetObjType`\swas\snot\sintended\sto\sbe\sused\sin\sthis\sfashion\s(which\sthen\salso\sraises\sthe\squestion\sof\swhy\sit\swas\sthere\sin\sthe\sfirst\splace)\sbut\sthere\swas\sno\sother\salternative\swithout\sresorting\sto\spassing\s"type/value"\spairs\severywhere.\r\n\r\n/Ashok
J login apnadkarni
J mimetype text/x-markdown
K b5bd08df8d61b4ea9bf0cc885f790b367c430a9f
U apnadkarni
Z 3a0dfd8a6f0f1a8202b8445cf0a1e647