Skip to content
Tcl Source Code Artifact [d3b69988d4]
Login

Artifact [d3b69988d4]

Artifact d3b69988d4736ce985dd1f0677c44e244f350758:

Ticket change [d3b69988d4] - Ticket [1446696fffffffff|1446696fff] <i>Tcl_ParseArgv as a useful non-Tk version of Tk_ParseArgv</i> status still Open with 4 other changes by sbromle on 2006-06-19 02:59:34.
D 2006-06-19T02:59:34
J icomment Logged\sIn:\sYES\s\nuser_id=1472195\n\nHi\sStephen,\nThanks\sfor\syour\sreply.\sIt\slooks\slike\sa\slot\sof\sthought\nhas\sbeen\sput\sinto\stclobjv.c,\sand\sperhaps\sit\swould\smake\na\sbetter\scodebase\sto\sadopt\sinto\sTcl\sproper,\stho\sI\sdon't\nyet\sreally\shave\sthe\sTcl\sexperience\sto\sjudge.\s:)\n\nIf\syou\swould\sindulge\sme\sa\slittle\sfurther,\sI'd\slike\sto\sraise\na\sfew\smore\squestions\swith\syou.\sIn\smy\suse\sof\stclArgv.c,\swe've\nimplemented\smany\scommands,\sI\sguess\seffectively\screating\nsomewhat\sof\sa\sdomain\sspecific\slanguage.\sA\stypical\scommand\nactually\sperforms\smany\sfunctions\sand\sso\swe've\sfound\sthat\sour\ncommands\soften\shave\stens\sof\soptions.\sRemembering\sthem\sall\nis\shard\swithout\san\sautomatically\sgenerated\shelp.\sBasically\sI\nfeel\sthat\sthe\sexisting\sGetIndexFromObj\ssuffices\sfor\stypical\nC-implemented\sTcl\scommands,\sand\sin\sthis\scontext,\san\nautomaticly\sgenerated\shelp\sis\sextraneous.\sHowever,\sI\sfigure\nthat\sif\syou\sneed\sthe\sextra\scomplexity\sof\stclArgv\sfor\syour\ncommand\sparsing,\sthen\syou'd\sprobably\swant\sthe\sautomatically\ngenerated\shelp.\sBeing\sable\sto\sadd\sdescriptions\sto\seach\noption\sis\sthen\sa\sreal\sbenefit.\sWould\syou\sconsider\sadding\sthe\nability\sto\sattach\sdescriptions\sto\seach\sof\syour\soptions\sand\narguments?\s(I\sreally\slike\sthe\sway\syou\shandle\sthe\sarguments\nas\swell,\sas\scurrenly,\stclArgv\sdoes\snot\sgenerate\sautomatic\nhelp\sfor\sthe\sarguments,\sbut\sstrapping\sthis\sonto\stclobjv\ncould\sbe\sa\snice\sway\sto\sgo.)\n\nRequiring\sa\sspecific\sorder\sfor\sarguments\s(that\sis,\scoming\nbefore\sall\soptions)\sis\sprobably\sa\sgood\sidea\sfor\sconsistency.\nSure\stclArgv\sdoesn't\scare,\sbut\sany\suser\scould\sget\sused\sto\sit.\n\nIn\sone\ssense\sI\slike\sthat\syour\sunknown\sarguments\strigger\san\nerror.\sOn\sthe\sother\shand,\sthis\sprevents\syou\sfrom\scalling\sa\nnested\scommand\swith\sthe\ssame\sobjv[].\sDoing\sthis\skind\sof\nthing\sis\sprobably\snot\svery\scommon\soutside\sof\sX\sapplication\nprogramming,\sso\sI'm\ssure\swe\sneed\snot\sworry\sabout\sit.\n\nI\slike\sthat\syou\salready\shave\sa\scomplete\sset\sof\stests\navailable.\sIt\sis\salso\sgood\sthat\syou\suse\sTcl_GetIndexFromObj.\n\nAestetically\s(which\smeans\sa\strivial\schange\sonly\sis\srequired)\nI\swould\slike\sto\ssee\sa\sversion\sthat\sremoves\sall\sthe\s"Ns"\nprepending\sso\sthat\sit\slooks\smore\score-Tcl-ish.\s(Yeah,\sthis\npoint\sis\sobvious.\s:)\s)\n\nW.r.t.\sto\sDon's\ssuggestions\sfor\stclArgv,\sI've\smade\sthe\nfollowing\schanges:\n(i)\sRemoved\sTCL_DONT_SKIP_FIRST_ARG.\n(ii)\sTCL_ARGV_NO_ABBREV\s->\sTCL_EXACT\n(iii)\sAdded\sa\s&remObjv\sargument\sto\scollect\sunprocessed\narguments,\sand\sthus\salso\seliminating\sthe\nTCL_ARGV_NO_LEFTOVERS\sflag.\n(iv)\sI\sdisagree\swith\sditching\sthe\s-help\soption,\sfor\sthe\nreason\sI\scited\sabove\sregarding\sthe\sdeveloper/user\salready\nchoosing\sthe\sgreater\scomplexity\sof\stclArgv\sover\sa\nTcl_GetIndexFromObjv-only\ssolution.\n\nI'm\sstill\scontinuing\swork\son\sit.\sI\shaven't\syet\sre-cast\nTcl_ParseArgv\sas\sa\sthin\swrapper\saround\sTcl_ParseObjArgv,\nnor\sadded\sthe\smissing\sdata\stypes.\sI'll\sdo\smy\sbest\sto\ssubmit\na\spatch\swith\sall\sthe\schanges\ssoon.\n\nMeanwhile,\sif\sStephen\scould\sprovide\sme\swith\sa\slittle\spackage\nthat\sallowed\sme\sto\suse\shis\sversion\sas\sa\slittle\sshared\nlibrary,\swith\sthe\smodification\sto\sprovide\sdynamic\shelp,\sI'll\nmerge\sit\sin\swith\smy\sapplication\sand\sgive\sit\sa\stest\sdrive\sto\nsee\swhat\sthe\susers\sthink.\n\nI\slook\sforward\sto\shearing\sany\ssuggestions\sfrom\sanyone\nregarding\sthe\ssuitability\s(or\slack-thereof)\sof\sthe\stwo\noptions\s(TclArgv\sand\stclobjv).\n\nCheers,\nSam.\s\n
J login sbromle
J mimetype text/plain
J username sbromle
K 1446696fffffffffffffffffffffffffffffffff
U sbromle
Z 6ef6eb799bfeeefdc8268dddebe16cc7