Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/Ask%2C+and+it+shall+be+given+%23+9?V=286
QUERY_STRINGV=286
CONTENT_TYPE
DOCUMENT_URI/revision/Ask,+and+it+shall+be+given+#+9
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.69.7.38
REMOTE_PORT35126
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR18.119.248.169
HTTP_CF_RAY88d21d240ec06181-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_REFERERhttp://wiki.tcl.tk/revision/Ask%2C+and+it+shall+be+given+%23+9?V=286
HTTP_CF_CONNECTING_IP18.119.248.169
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit {Ask, and it shall be given # 9} **How\ to\ post\ on\ this\ page**\ \n\n\ \ \ \ *\ '''Started\ on:'''\ 2011\ February\ 6th\ (Sunday)\n\ \ \ \ *\ '''Ended\ on:'''\ \n\n------>\ Next:\ See\ \[Ask,\ and\ it\ shall\ be\ given\ #\ 10\]\ \ \ \ \ \ \ \n\n\ \ \ *\ This\ page\ runs\ the\ risk\ of\ being\ deleted\ and\ corrupted.\ Please\ be\ very\ careful\ when\ editing\ it.\ If\ you\ inadvertently\ delete\ it,\ immediately\ revert\ your\ edit\ using\ the\ History\ link\ on\ the\ left\ side\ of\ this\ page.\ \ Do\ NOT\ attempt\ to\ restore\ it\ by\ copying'n'pasting\ the\ text\ from\ a\ previous\ revision,\ or\ all\ page\ formatting\ will\ be\ lost!\n\n\ \ \ *\ Please\ put\ new\ questions\ at\ the\ '''TOP'''\ of\ the\ page,\ so\ that\ as\ the\ page\ grows\ longer,\ new\ questions\ are\ seen\ first.\n\n\ \ \ *\ Also\ please\ put\ a\ section\ header\ on\ top\ of\ every\ question\ and\ put\ two\ stars\ in\ the\ beginning\ of\ the\ title\ and\ two\ stars\ in\ the\ end.\ This\ will\ make\ your\ question's\ section\ easily\ editable.\ \ \n\n\ \ \ *\ Once\ you\ have\ received\ a\ satisfactory\ answer,\ please\ cut\ your\ question\ and\ answer\ directly\ on\ an\ appropriate\ page\ of\ the\ wiki.\ If\ you\ cannot\ find\ an\ existing\ page,\ create\ a\ new\ one.\ \n\n\ \ \ *\ You\ might\ also\ simply\ want\ to\ put\ a\ hyperlink\ leading\ to\ a\ page\ of\ the\ wiki\ where\ your\ question\ is\ included\ like\ Didier\ has\ done\ on\ February\ 5th\ 2011.\ This\ will\ save\ you\ the\ trouble\ of\ cutting\ your\ question\ to\ an\ existing\ page\ afterwards.\ \n\n\n----\n\n**Detecting\ when\ a\ client\ is\ not\ reading\ data\ from\ a\ socket\ (or\ pipe)\ \ as\ fast\ as\ the\ server\ is\ writing**\n\n\[jbr\]\ Any\ ideas\ how\ to\ do\ this?\n\nIt\ seems\ \[puts\]\ will\ block\ or\ push\ data\ in\ the\ background.\ \ If\ it\ is\ interrupted\ with\ \[alarm\]\ it\ happily\ continues.\ \ Here\ is\ a\ small\ patch\ to\ allow\ TclX\ alarm\ to\ interrupt\ blocking\ output\ \[\[puts\]\].\ \ Is\ this\ a\ good\ idea?\n\n======\n\nIndex:\ generic/tclIO.c\n===================================================================\n---\ generic/tclIO.c\n+++\ generic/tclIO.c\n@@\ -2416,16\ +2416,17\ @@\n\ \ \ \ \ \ \ \ \ \ *\ write\ any\ more\ output\ at\ this\ time.\n\ \ \ \ \ \ \ \ \ \ */\n\ \n\ \ \ \ \ \ \ \ \ if\ (written\ <\ 0)\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ /*\n-\ \ \ \ \ \ \ \ \ \ \ \ \ *\ If\ the\ last\ attempt\ to\ write\ was\ interrupted,\ simply\ retry.\n+\ \ \ \ \ \ \ \ \ \ \ \ \ *\ If\ the\ last\ attempt\ to\ write\ was\ interrupted,\ Check\ for\ async\ events\ or\ simply\ retry.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ */\n-\n\ \ \ \ \ \ \ \ \ \ \ \ \ if\ (errorCode\ ==\ EINTR)\ \{\n-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ errorCode\ =\ 0\;\n-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ continue\;\n+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (!Tcl_AsyncReady()\ ||\ Tcl_AsyncInvoke(interp,\ TCL_OK)\ ==\ TCL_OK)\ \{\n+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ errorCode\ =\ 0\;\n+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ continue\;\n+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ \ \ \ \ \ /*\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ *\ If\ the\ channel\ is\ non-blocking\ and\ we\ would\ have\ blocked,\ start\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ *\ a\ background\ flushing\ handler\ and\ break\ out\ of\ the\ loop\n\n----\n**Connection\ to\ a\ C\ program\ from\ Tcl**\n\n\[Gerry\ W.\]\ I\ like\ a\ lot\ the\ way\ I'm\ able\ to\ run\ a\ C\ code\ from\ TCL.\ I\ do\ have\ a\ problem\ however\ albeit\ a\ small\ one.\ I\ enter:\ long\ opening\ bracket\ c:/Data/Cprogram.exe\ long\ closing\ bracket.\ No\ problem\ everything\ works\ fine.\ The\ problem\ is\ this:\ I\ simply\ need\ the\ Tcl\ program\ to\ look\ up\ the\ name\ of\ a\ datafile\ in\ a\ location,\ to\ take\ the\ 5\ last\ digits\ of\ the\ path\ and\ to\ put\ them\ next\ to\ long\ opening\ bracket\ c:/Data/Cprogram.exe\ long\ closing\ bracket.\ How\ do\ I\ do\ all\ that.\ \n\nLet\ me\ be\ more\ specific.\ The\ program\ in\ C\ modifies\ data\ and\ the\ name\ of\ the\ file\ to\ modify\ must\ be\ written\ at\ the\ command\ line\ next\ to\ the\ C\ program.\ Ex:If\ I\ go\ on\ c:/Data/\ and\ I\ type\ Cprogram.exe\ Data1,\ the\ Data1\ file\ will\ be\ treated.\ \n\nDoes\ my\ putting\ in\ bracket\ correspond\ to\ an\ entry\ at\ the\ prompt?\ \ \ \ \ \ \n\n----\n**The\ realize\ of\ Gaussian\ stochastic\ process\ through\ TCL/TK**\n\nDear\ all,\ I\ want\ to\ produce\ a\ vector\ Gaussian\ stochastic\ process\ '''h(t)'''\ with\ statistical\ properties\ <hi(t)>=0\ and\ <hi(t)hj(s)>=Dδijδ(t-s),\ where\ i\ and\ j\ are\ the\ Cartesian\ indices.\ D\ is\ constant\ number,δij\ and\ δ(t-s)\ are\ Kronecker\ δ\ and\ Dirac\ δ.\ How\ could\ I\ write\ it\ with\ TCL/TK?\nMuch\ thanks.\n\n----\n**\ Native\ \[MDI\]\ extension\ for\ Windows**\ \n\n\[MG\]\ Anyone\ know\ of\ a\ native\ \[MDI\]\ extension\ for\ Windows\ anywhere?\ I'm\ sure\ I\ saw\ one\ once,\ but\ can't\ find\ any\ mention\ of\ it\ now.\ Thanks\ for\ your\ help.\n\n----\n**\ Precompiled\ threaded\ 8.5\ tclkit\ for\ OSX**\n\n\[Ro\]\ 2011-09-16\ Anyone\ have\ a\ precompiled\ threaded\ 8.5\ tclkit\ for\ OSX?\ I\ use\ \[Pat\ Thoyts\]'s\ builds\ for\ Linux\ and\ Windows\ and\ they\ work\ great\ (8.5.9\ tclkit\ threaded),\ but\ Roy\ Keene's\ latest\ http://rkeene.org/projects/info/wiki/Tclkits\ isn't\ threaded\ on\ OSX.\ Thanks!\n\nSupposedly\ the\ basekit\ provided\ by\ \[ActiveState\]\ is\ multithreaded\ on\ OS\ X\ but\ is\ it\ free\ to\ use\ for\ any\ use?\n\n\[YS\]\ Look\ at\ result\ of\ this\ script:\n======\ncanvas\ .c\ -bg\ white\ngrid\ .c\nset\ x1\ 20\nset\ x2\ 22\nset\ y2\ 105\nfor\ \{set\ f\ 0\}\ \{\$f<50\}\ \{incr\ f\}\ \{\n\ \ \ \ set\ y1\ \[expr\ \{\$y2-0.05*\$f\}\]\n\ \ \ \ .c\ create\ rectangle\ \$x1\ \$y1\ \$x2\ \$y2\ -fill\ black\n\ \ \ \ incr\ x1\ 2\n\ \ \ \ incr\ x2\ 2\n\ \ \ \ \}\n======\nOn\ Windows\ XP\ I\ see\ that\ at\ left\ side\ of\ figure\ bottom\ margin\ is\ one\ pixel\nlower\ than\ at\ right\ side.\ But\ it\ shouldn't\ happen\ as\ y2\ is\ the\ same\ (105)\ for\nall\ rectangles.\ What\ do\ you\ think?\n\n----\n**Using\ TCOM\ to\ make\ DNS\ changes\ via\ WMI**\n\nFor\ more\ detail\ about\ this\ question\ see\ http://wiki.tcl.tk/1821\n\nResolved,\ follow\ link\ to\ see\ examples.\n\n----\n**Tclkit\ does\ not\ run\ on\ my\ PC**\n\n\[wdb\]\ Aug\ 26\ 2011\ --\ yesterday\ bought\ and\ unpacked\ my\ PC,\ installed\ SuSE\ Linux,\ downloaded\ Tclkit\ from\ equi4.\n\n======\nwolf@linux-t1xi:~/Downloads>\ ls\ -l\ninsgesamt\ 1440\n-rwxr-xr-x\ 1\ wolf\ users\ 1472785\ 26.\ Aug\ 06:16\ tclkit-linux-x86-8.5.1\nwolf@linux-t1xi:~/Downloads>\ ./tclkit-linux-x86-8.5.1\ \nbash:\ ./tclkit-linux-x86-8.5.1:\ Kann\ die\ Datei\ nicht\ ausführen.\n======\n\nTranslation:\ could\ not\ execute\ program\ file.\ No\ explanation.\ Any\ suggestions\ what\ went\ wrong?\n\nI\ just\ tried\ it.\ File\ had\ a\ slightly\ different\ name,\ but\ problem\ was\ it\ had\nbeen\ doubly\ gzipped.\ I\ had\ to\ gunzip\ twice,\ then\ it\ worked.\n\nIan\n\n\[wdb\]\ Many\ thanks!\ My\ life\ has\ as\ sense\ again\ \;-)\n\n----\n**tcom\ package\ in\ 64-bit\ windows\ or\ 64-bit\ alternative**\n\[jrs\]\ Aug\ 19\ 2011\ -\ I'm\ trying\ to\ port\ a\ project\ that\ relies\ heavily\ on\ tcom\ for\ office\ automation.\ \ Part\ of\ the\ requirements\ for\ this\ port\ is\ that\ it\ runs\ on\ 64-bit.\ \ Therefore,\ I'm\ trying\ to\ compile\ the\ tcom\ project\ in\ 64-bit.\n\nUnfortunately\ it\ does\ not\ compile,\ due\ to\ some\ in-line\ assembly\ code\ that\ is\ used.\ \ Here\ is\ a\ snippet\ of\ the\ culprit\ C\ code:\n======\nstatic\ __declspec(naked)\ void\ndelegate\ (void)\n\{\n\ \ \ \ __asm\ \{\n\ \ \ \ \ \ \ \ push\ ebp\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ set\ up\ simple\ stack\ frame\n\ \ \ \ \ \ \ \ mov\ \ ebp,\ esp\n\n\ \ \ \ \ \ \ \ sub\ \ esp,\ 8\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ set\ up\ local\ variables\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ localVar(hrFromInvoke)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ localVar(pArgEnd)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ ebp\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ funcIndex\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ retAddr\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ this\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ args\n\n\ \ \ \ \ \ \ \ call\ invokeComObjectFunction\n\n\ \ \ \ \ \ \ \ //\ The\ following\ code\ adjusts\ the\ stack\ and\ returns\ to\ the\ caller.\n\ \ \ \ \ \ \ \ //\ This\ involves\ copying\ the\ return\ address\ and\ the\ HRESULT\n\ \ \ \ \ \ \ \ //\ to\ the\ bottom\ of\ the\ stack\ frame,\ adjusting\ the\ stack\n\ \ \ \ \ \ \ \ //\ pointer,\ and\ returning\ to\ the\ caller.\n\ \ \ \ \ \ \ \ push\ esi\n\ \ \ \ \ \ \ \ mov\ \ esi,\ \[ebp-4\]\ \ \ \ \ \ \ //\ esi\ =\ address\ after\ last\ argument\n\n\ \ \ \ \ \ \ \ sub\ \ esi,\ 4\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ esi\ points\ to\ bottom\ arg\ on\ stack\n\ \ \ \ \ \ \ \ mov\ \ eax,\ \[ebp+8\]\ \ \ \ \ \ \ \ //\ copy\ retaddr\ down\n\ \ \ \ \ \ \ \ mov\ \ \[esi\],\ eax\n\n\ \ \ \ \ \ \ \ sub\ \ esi,\ 4\n\ \ \ \ \ \ \ \ mov\ \ eax,\ \[ebp-8\]\ \ \ \ \ \ \ \ //\ copy\ hrFromInvoke\ down\n\ \ \ \ \ \ \ \ mov\ \ \[esi\],\ eax\n\ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ mov\ \ eax,\ esi\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ reset\ stack\ and\ return\ to\ caller\n\ \ \ \ \ \ \ \ pop\ \ esi\n\ \ \ \ \ \ \ \ mov\ \ ebp,\ \[ebp\]\n\ \ \ \ \ \ \ \ mov\ \ esp,\ eax\n\ \ \ \ \ \ \ \ pop\ \ eax\n\ \ \ \ \ \ \ \ ret\n\ \ \ \ \}\n\}\n======\nSo\ my\ options\ seem\ to\ be\ to\ either\ figure\ out\ how\ to\ get\ this\ code\ working\ on\ 64-bit\ or\ find\ an\ alternative\ to\ tcom.\ \ I've\ already\ investigated\ trying\ to\ get\ this\ code\ working\ in\ 64-bit\ and\ it\ seems\ it\ could\ be\ possible\ using\ MASM,\ but\ unfortunately\ my\ attempts\ at\ this\ method\ were\ without\ success.\ \ The\ only\ alternative\ I\ found\ was\ package\ optcl.\ \ I\ downloaded\ it\ but\ I'm\ still\ investigating\ if\ it\ will\ be\ a\ suitable\ replacement.\n\nAny\ suggestions\ would\ be\ greatly\ appreciated.\n\nThanks,\nJosh\n\nAnswer:\ So\ I\ ended\ up\ emailing\ the\ author\ of\ tcom\ and\ he\ suggested\ I\ download\ the\ latest\ beta\ release\ of\ tcom\ which\ has\ an\ included\ define\ that\ can\ disable\ this\ \"vtable\"\ if\ it\ isn't\ needed.\ \ Luckily\ the\ project\ I'm\ upgrading\ does\ not\ use\ this\ vtable,\ so\ I\ was\ able\ to\ simply\ remove\ the\ preprocessor\ definition\ from\ the\ project\ settings.\ \ It\ now\ compiles\ fine\ as\ 64-bit.\n\nmhofmann\ (2011-09-19)\ Putting\ the\ assembly\ stuff\ into\ a\ freestanding\ MASM64-Module\ was\ exactly\ the\ thing\ I've\ done\ a\ while\ ago.\nAnd\ it\ did\ work!\nDue\ to\ different\ calling\ conventions,\ ComObject.cpp\ and\ ComObject.h\ also\ had\ to\ be\ adapted.\n\nIf\ you\ are\ or\ anybody\ is\ interested,\ you\ can\ find\ the\ source\ files\ at\ http://www.tin-pot.coco.mydisk.se/\ \n\nIn\ the\ Download\ folder\ there,\ I\ provide\n\n\ \ \ *\ a\ tcom64.zip\ archive,\ containing\ the\ Tcom\ 64\ library/tcom\ files\ (dll's\ etc)\ and\n\ \ \ *\ a\ simple\ installer\ for\ a\ 64\ bit\ Tcl8.6\ distro,\ including\ the\ tcom\ stuff.\n\nHope\ that\ helps,\n\nMartin\ \n\n----\n**Show\ activity\ in\ a\ ttk::notebook\ tab**\n\[MG\]\ Aug\ 19\ 2011\ -\ I'm\ hoping\ to\ use\ a\ \[ttk::notebook\]\ for\ an\ app,\ but\ I\ need\ some\ way\ to\ show\ when\ there's\ activity\ in\ a\ tab.\ The\ only\ option\ I\ can\ see\ so\ far\ is\ using\ an\ -image\ and\ changing\ it\ when\ there's\ activity,\ but\ that's\ not\ going\ to\ be\ very\ obvious.\ Ideally,\ I'd\ like\ to\ flash\ the\ tab\ or\ something\ like\ that,\ but\ have\ no\ idea\ if\ that's\ possible.\ I've\ looked\ through\ the\ ttk\ theme\ files\ and\ can't\ see\ anything\ helpful,\ or\ in\ the\ docs.\ Can\ anyone\ suggest\ anything?\ Thanks\ for\ your\ help.\n\n----\n**Suggestion\ Box?**\n\[gold\]\ 5aug2011:\ Does\ this\ TCL\ wiki\ have\ an\ obvious\ suggesion\ box?\ thanks.\ \n\n----\n**Problems\ with\ Set\ total**\n\n\[gold\]\ 11jul2011,\ problems\ with\ set\ total\ ...\ sexagesimal\ conversion\ is\ supposed\nto\ be\ 30/60\ or\ 0.5.\n\[gold\]17jul2011.\ Fixed\ problem,\ closed\ out.\n\n----\n**Tcl\ syntax**\nI\ was\ just\ over\ at\ RosettaCode.\ They've\ marked\ Tcl\ as\ not\ capable\ of\ inverted\ syntax\ http://rosettacode.org/wiki/Inverted_syntax\ .\ I'm\ pretty\ sure\ they're\ wrong\ ...\ \[BMA\]\n\n\[RLE\]\ (2011-06-27)\ While\ they\ will\ likely\ say\ that\ this\ fails\ for\ some\ reason\ they\ make\ up\ after\ the\ fact,\ but\ it\ would\ seem\ that\ \[do...until\ in\ Tcl\]\ would\ qualify\ for\ their\ definition\ of\ inverted\ syntax.\n\n\[DCD\]\ (2011-07-11)\ I\ pasted\ do.tcl\ into\ the\ RosettaCode\ page\ -\ and\ added\ an\ ugly\ hack\ using\ unknown\ that\ should\ qualify\ as\ truly\ inverted.\n\n----\n**Memory\ pre-allocation**\n\n\[DVB\]\ (2011-06-19)\ Is\ there\ a\ way\ to\ pre-allocate\ a\ defined\ amount\ of\ memory\ before\ the\ interp\ use\ it?\nIt\ would\ be\ like\ a\ guarantee\ that\ it\ will\ be\ worth\ to\ start\ processing.\n\nThanks\ in\ advance.\n\n\[gold\]\ 28jun2011,\ Found\ some\ references\ on\ \[memory\].\ \n\ \ \ *\ http://www.tcl.tk/man/tcl8.6/TclCmd/memory.htm\n\ \ \ *\ http://www.astro.princeton.edu/~rhl/Tcl-Tk_docs/tcl/Alloc.3.html\n\ \ \ *\ http://www.astro.princeton.edu/~rhl/Tcl-Tk_docs/tcl/Interp.3.html\n\ \ \ *\ http://rosettacode.org/wiki/Memory_allocation\n\ \ \ *\ http://rosettacode.org/wiki/Machine_Address\n\ \ \ *\ http://www.digital-smarties.com/Tcl2002/critcl.pdf\n\ \ \ *\ http://equi4.com/starkit/critcl.html\n\ \ \ *\ http://en.wikipedia.org/wiki/Malloc\n\ \ \ *\ http://valgrind.org/info/about.html\nIf\ you\ are\ on\ windows,\nthe\ \[twapi\]\ extension\ will\ obtain\ get_memory_info.\n======\n\ console\ show\n\ package\ require\ twapi\n\ set\ maximum_memory\ \[expr\ \{1.*1E9\}\]\n\ set\ memory_physical\ \[lindex\ \[::twapi::get_memory_info\ -totalphysical\]\ 1\]\n\ if\ \{\$memory_physical\ \ <\ \$maximum_memory\}\ \{\ puts\ \"\ memory\ \$memory_physical\ \ \"\;\ \n\ error\ \"\ out\ of\ memory\ \$memory_physical\ \"\ \ \}\n======\n\n----\n**Recursive\ Lists**\n\nI\ Want\ a\ Tcl\ script\ which\ does\ the\ foolowing:\n\ \ \ \ :\ \ \ procedure\ to\ generate\ a\ single\ list,\ by\ reading\ the\ user\ input\ from\ command\ line.\ne.g.\ User\ Inputs:\ `\{1\ 5\ 23\ \{abc\ 23\ \{564\ abc\}\}\}\ 1\ 5\ \{56\ rrf\ 45\ \{127\ 458\}\}`<<br>>\nSo\ how\ to\ output\ index\ of\ each\ element...\n\nThat\ is,\ if\ 23\ should\ output\ index\ :\ 20<<br>>\nabc\ :\ 300<<br>>\nPlease\ help\n\nThanks,\nLeo\n\n\[gold\]\ 11jun2011,Recommend\ \ proc\ lflatten\ \{\ list\ \}\ of\ \[cyrilroux\]\ from\ \[list\].\nNested\ list\ is\ most\ intractable\ of\ all\ inputs,\ but\ the\ \nscript\ below\ takes\ your\ multiple\ nests\ and\ throws\ out\ a\n1\ element1\ 2\ element2\ ...\ N\ elementN\ \ output\ for\ loading\ into\ \nkeyed\ lists\ and\ arrays.\ Refs.\[keyed\ list\],\[dict\],\[list\ stripping\],\[args\],\[I\ love\ foreach\].\ Proc\ keyget\ from\ \ \[Additional\ list\ functions\]\nis\ also\ possible\ as\ example\ below:\ keyget\ \{\$outty\}\ 4.\ \nConsole\ input\ is\ king\ \{\ nested\ list\ \}.\ On\ many\ unix\ systems,\ input\ args\ \nwill\ work\ better\ as\ example:\ proc\ king\ \{args\}\ \{...source\ \[Recursive\ list\ searching\].tcl\;\nlrsearch\ \$args\ abc\;set\ aa\ \[\ lflatten\ \$args\ \]..\}.Search\ \"args*\"\ on\ wiki\ search\ engine\ for\ more\ examples.\n\n======\ \ \n\ #\ written\ on\ etcl\ console\ and\ windows\ XP\n\ \ \ console\ show\n\ \ \ \ global\ lister5\ bush\n\ \ \ \ set\ jack\ \[list\ \{1\ 5\ 23\ \{abc\ 23\ \{564\ abc\}\}\}\ 1\ 5\ \{56\ rrf\ 45\ \{127\ 458\}\}\]\n\ \ \ \ puts\ \"\ \ \$jack\ \ \ \ \"\n\ \ \ \ set\ outty\ \[list\]\n\ \ \ \ \ \ \ \ \ \ \ \ proc\ lflatten\ \{\ list\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ regsub\ -all\ \{^\\\{|\ \\\{|\\\{\\\{+|\\\}\$|\\\}\ |\\\}\\\}+\}\ \$list\ \{\ \}\ flatten\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \$flatten\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ \;#\ cyrilroux\ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ proc\ keyget\ \{list\ key\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ foreach\ \{lkey\ value\}\ \$list\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \[string\ equal\ \$lkey\ \$key\]\ \{return\ \$value\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \;#\ RS\n\ \ \ \ \ \ \ \ \ \ \ \ proc\ advisorx\ \{aa\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"input\ has\ form\ of\ king\ \{\ list\ \}\ \ \"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"advisor:\ new\ list????\ \"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ proc\ king\ \{\ aa\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ global\ lister5\ bush\ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ counterx\ 1\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ outty\ \[list\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ aa\ \[\ lflatten\ \$aa\ \]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ foreach\ item\ \$aa\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ outty\ \$counterx\ \$item\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ incr\ counterx\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"\ decision\ was\ \ ,\ total\ counters\ was\ \$counterx\ \ \ \"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"\ \[lflatten\ \$aa\ \]\"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"keyed\ \ \ \$outty\ \"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"\ keyget\ \[keyget\ \$outty\ 4\]\"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ advisorx\ \{aa\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ puts\ \"input\ has\ form\ of\ king\ \{\ list\ \}\ \ \"\n======\n----\n**\[menu\]\ radiobutton\ support\ with\ \[menubutton\]\ and\ \[ttk::menubutton\]\ on\ \[Mac\ OS\ X\]**\n\n\[Aud\]\ (2011-05-15)\ It\ is\ just\ me,\ or\ do\ menu\ radiobutton\ items\ act\ just\ like\ plain\ old\ command\ items\ (no\ tick\ displayed\ when\ selected\ via\ -variable),\ when\ the\ menu\ is\ assigned\ to\ either\ the\ standard\ Tk\ or\ the\ Ttk\ menubutton\ widgets\ under\ OS\ X?\ Running\ the\ same\ code\ under\ Linux\ gives\ me\ the\ expected\ behaviour\ (a\ radiobutton\ item\ shown\ as\ selected\ when\ menubutton\ clicked).\n\nMenus\ assigned\ to\ an\ OS\ X\ \[toplevel\]\ don't\ have\ this\ issue,\ and\ as\ far\ as\ I\ can\ tell\ from\ other\ OS\ X\ apps,\ Cocoa\ probably\ supports\ natively.\ Then\ again,\ isn't\ Tk\ 8.5\ still\ using\ Carbon?\ Maybe\ that's\ got\ something\ to\ do\ with\ this?\n\nExample\ for\ clarity:\n======\npackage\ require\ Tk\npackage\ require\ Ttk\n\nttk::menubutton\ .test\ -menu\ .menu\ -textvariable\ menu_value\npack\ .test\n\nset\ menu_value\ 1\nmenu\ .menu\n.menu\ add\ radiobutton\ -label\ One\ -variable\ menu_value\ -value\ 1\n.menu\ add\ radiobutton\ -label\ Two\ -variable\ menu_value\ -value\ 2\n======\n\n----\n**How\ does\ \"fieldbackground\"\ work\ at\ ttk::treeview?**\nenel\ (2011-05-09)\n\nA\ small\ test:\n======\n\ \ \ \ package\ require\ Tk\n\ \ \ \ package\ require\ tile\ 0.7.8\n\ \ \ \ frame\ .f\ -background\ red\ -border\ 10\n\ \ \ \ ttk::style\ configure\ Treeview\ -fieldbackground\ green\n\ \ \ \ ttk::style\ configure\ Treeview.Row\ -background\ green\n\ \ \ \ ttk::treeview\ .f.tv\ -columns\ \{name\ state\}\n\ \ \ \ .f.tv\ heading\ #0\ -text\ Id\n\ \ \ \ .f.tv\ heading\ name\ -text\ Name\n\ \ \ \ .f.tv\ heading\ state\ -text\ State\n\ \ \ \ \ \n\ \ \ \ .f.tv\ insert\ \{\}\ end\ -text\ 1\ -values\ \{John\ OH\}\n\ \ \ \ .f.tv\ insert\ \{\}\ end\ -text\ 2\ -values\ \{James\ WV\}\n\ \ \ \ .f.tv\ configure\ -style\ Treeview\n\ \ \ \ pack\ .f.tv\ .f\ -fill\ both\ -expand\ true\n======\nHow\ can\ I\ color\ the\ empty\ part\ of\ the\ treeview?\nI\ used\ manual\ \[ttk::style\ examples\].\n\n\[RLE\]\ (2011-05-09)\ Unless\ something\ has\ changed\ since\ that\ page\ was\ written\ (it\ was\ for\ 8.5.8,\ what\ version\ are\ you\ using?),\ your\ test\ should\ have\ worked\ and\ should\ have\ colored\ the\ empty\ portion\ green.\ \ What\ did\ you\ see\ happening\ instead?\n\n\[enel\]\ (2011-05-09)\n======\n\n-\ TK_VERSION='8.5'\n-\ TK_MAJOR_VERSION='8'\n-\ TK_MINOR_VERSION='5'\n-\ TK_PATCH_LEVEL='.8'\n-\ tile-0.8.4.0\n======\nMy\ http://web.barczi.hu/enel/tek-tips/tv_00.jpg%|%\"result\"%|%\ is.\n\n\[RLE\]\ (2011-05-10)\ When\ I\ paste\ your\ unchanged\ example\ above\ into\ a\ wish\ on\ Linux\ (also\ 8.5.8),\ I\ get\ a\ full\ green\ background\ for\ the\ entire\ treeview\ area.\ \ When\ I\ try\ 8.5.9\ under\ WinXP\ I\ get\ a\ white\ background\ for\ the\ entire\ treeview.\ \ It\ appears\ that\ there\ is\ some\ kind\ of\ override\ happening\ on\ windows\ that\ does\ not\ happen\ on\ Linux.\ \ You\ might\ want\ to\ try\ asking\ your\ question\ on\ comp.lang.tcl\ in\ this\ case.\n\n\[enel\]\ (2011-06-11)\ Thanks\ the\ idea,\ I\ did\ it.\ I\ haven't\ got\ any\ answer\ for\ a\ month,\ so\ I\ \"close\"\ (give\ up)\ this\ topic.\n\n\[RLE\]\ (2011-06-11)\ That\ is\ too\ bad.\ \ You\ have\ either\ discovered\ a\ bug,\ or\ you\ have\ discovered\ a\ manner\ in\ which\ the\ Win\ version\ just\ works\ differently.\ \ But\ we\ don't\ know\ which\ outcome\ (bug\ or\ difference)\ is\ correct.\n\n\[enel\]\ (2011-07-02)\nWhen\ a\ windows-exe\ generated\ by\ tclkit\ the\ unconfigurable\ territory\ is\ red\ colored.\nMy\ http://web.barczi.hu/enel/tek-tips/tv_01.jpg%|%\"exe-result\"%|%\ is.\n\n----\n**\[How\ to\ run\ external\ script\ from\ Tk\ and\ make\ it\ throw\ output\ to\ the\ console?\]**\n\[gold\]\ 2011-05-10,\nPerhaps,\ \[exec\],\ \nhttp://www.tcl.tk/man/tcl8.5/TclCmd/exec.htm,\ \ \nhttp://www.tcl.tk/faq/tclwin.htm,\nhttp://www.tcl.tk/man/tcl/tutorial/Tcl26.html,\n\[A\ minimal\ console\],\ and\ http://www.tcl.tk/software/plugin/eval.html\nwould\ be\ a\ good\ place\ to\ start.\n\nA\ session\ from\ the\ Etcl\ console\ on\ a\ an\ XP\ windows.\n======\ \n\ \ \ \ 2%\ exec\ etcl.exe\ king4.tcl\ \n\ \ \ \ 9%\ exec\ king4.exe\ #\ using\ freewrap\ compiled\ tcl\ executable\n\ \ \ \ 11%\ eval\ exec\ etcl.exe\ king4.tcl\n\ \ \ \ 12%\ set\ output5\ \[exec\ etcl.exe\ external_script_king4.tcl\ \]\n\ \ \ \ 15%\ puts\ \$output5\n\ \ \ \ 17%\ set\ tip\ \[\ more\ king4.tcl\]\ #using\ \ more\ to\ grab\ script\n\ \ \ \ 16%\ eval\ \$tip\n\ \ \ \ 17%\ console\ eval\ \$tip\ #\ may\ overwrite\ console\ display\ or\ functions\n\ \ \ \ \ load\ hello.tcl\ (text\ file)\ as\ one\ line,\ puts\ \"overwrite\ hello\"\n\ \ \ \ 18%\ source\ hello.tcl\ #should\ see\ \"overwrite\ hello\"\ on\ console\ window\n\ \ \ \ \ load\ pie.tcl\ (text\ file)\ as\ one\ line,\ proc\ pi\ \{\}\ \{expr\ acos(-1)\}\n\ \ \ \ \ 19%\ source\ pie.tcl\n\ \ \ \ \ 20%\ set\ piepie\ \[\ pi\ \]\;\ puts\ \$piepie\n\ \ \ \ \ \ \ \ \ answer:\ 3.141592653589793\n======\nThe\ \[Combining\ Fortran\ and\ Tcl\ in\ one\ program\]\ \ and\ \[Managing\ Fortran\ programs\]\nare\ some\ starter\ code\ for\ \ncalling\ on\ external\ programs\ and\ external\ scripts.\nAlso,\ the\ pull\ down\ menu\ on\ the\ etcl\ console\ has\nbuttons\ for\ sourcing\ and\ executing\ TCL\ code.\n----\n**Window\ configuration\ does\ not\ follow\ the\ sizegrip\ while\ the\ window\ manager\ does**\n\nI\ added\ a\ ttk::sizegrip\ to\ a\ window\ to\ give\ the\ user\ the\ possibility\ resizing\ the\ window\ to\ his/her\ needs.\ Unfortunately,\ the\ window\ contents\ is\ not\ resized\ when\ the\ sizegrip\ is\ dragged\ but\ the\ window\ frame\ added\ \nby\ the\ window\ manager\ gets\ the\ expected\ size.\ The\ same\ effect\ occurs\ if\ the\ window\ is\ resized\ by\ the\ window\ manager\ directly\ (whether\ or\ not\ a\ sizegrip\ is\ present).\ What\ can\ I\ do\ to\ resize\ the\ window\ contents?\n\nThe\ platform\ used:\ \n======\n-\ SunOS\ 5.10\ Generic_144488-08\ sun4u\ sparc\ SUNW,Sun-Fire-V440\ Solaris\n-\ Tcl\ version\ 8.5\ ,\ Tk\ version\ 8.5\n-\ Tcl/Tk\ compiled\ from\ sources\ by\ gcc\ (pre-installed\ is\ version\ 8.4)\n======\n\nA\ small\ test\ program\ follows\ (modifying\ the\ \"sticky\"\ settings\ has\ no\ effect\ here):\n======\n#!/bin/sh\n#\ the\ next\ line\ restarts\ using\ wish\ \\\nexec\ wish\ \"\$0\"\ \"\$@\"\n\n#\ Fill\ window\ by\ some\ stuff:\nttk::frame\ .top\ngrid\ .top\ -row\ 0\ -column\ 0\ -sticky\ nswe\ngrid\ \[ttk::label\ .top.label\ -text\ \"Test\"\]\ -row\ 0\ -column\ 0\ -sticky\ w\nttk::button\ .top.button\ -text\ \"Close\"\ -command\ \{\ exit\ \}\ngrid\ .top.button\ -row\ 0\ -column\ 1\ -sticky\ e\ngrid\ \[ttk::label\ .top.status\ -text\ \"Status\"\]\ -row\ 1\ -column\ 0\ -columnspan\ 2\ -sticky\ we\n#\ Add\ sizegrip:\ngrid\ \[ttk::sizegrip\ .top.grip\]\ -row\ 1\ -column\ 2\ -sticky\ se\n======\n\n\[RLE\]\ (2011-04-06):\ Grids\ by\ default\ do\ not\ automatically\ expand\ when\ their\ container\ expands.\ \ You\ need\ to\ tell\ the\ grid\ manager\ how\ you\ want\ the\ various\ rows\ and\ columns\ to\ expand.\ \ Take\ a\ look\ at\ the\ \"-weight\"\ option\ to\ the\ grid\ columnconfigure\ and\ grid\ rowconfigure\ sub-commands.\n\nFor\ your\ example\ above,\ while\ I\ don't\ know\ exactly\ how\ you\ would\ want\ it\ to\ expand,\ if\ you\ do:\n======\ngrid\ rowconfigure\ .\ 0\ -weight\ 1\ngrid\ columnconfigure\ .\ 0\ -weight\ 1\ngrid\ rowconfigure\ .top\ 0\ -weight\ 1\ngrid\ columnconfigure\ .top\ 0\ -weight\ 1\n======\nThen\ your\ grid\ layout\ will\ expand/contract\ with\ changes\ in\ the\ window\ size\ (although\ maybe\ not\ expand/contract\ the\ way\ you\ want).\n----\n**Multithreaded\ Image\ Processing**\n\n\[tml\]\ 3/30/2011:\ I\ need\ to\ load\ and\ process\ quite\ a\ lot\ of\ big\ image\ files,\ and\ loading\ a\ single\ image\ alone\ will\ take\ about\ 3\ seconds,\ which\ makes\ my\ GUI\ quite\ irresponsive.\ Is\ it\ possible\ to\ load\ and\ process\ an\ image\ in\ a\ secondary\ thread\ and\ then\ transfer\ that\ image\ to\ my\ main\ thread\ in\ a\ similar\ manner\ as\ that's\ already\ possible\ for\ channels\ ...\ maybe\ by\ writing\ some\ C\ code\ for\ that\ purpose?\n\n\[gold\]\ 5/16/2011.\ Found\ refs.\ If\ you\ can\ work\ with\ thumbnails,\ a\ tcl\ or\ perl\ script\ can\ use\ imagemagick\ to\ thumbnail\ every\ image\ in\ a\ directory\ or\ tailor\ to\ specific\ megabyte\ size.\n\ \ \ *\ http://www.neatware.com/myrmecox/studio/ex_tclmagick.html,\n\ \ \ *\ http://members.shaw.ca/el_supremo/TclWand_053.zip,\n\ \ \ *\ http://www.evolane.com/software/pixane/pixane.html\nEspecially\ look\ at\ \[Fast\ image\ resizing\],\ which\ implies\ you\ might\ have\ to\ compile\nthe\ TCL\ code\ (possibly\ \[Freewrap\]\ if\ speed\ alone\ is\ consideration.\nAlso,\ http://www.xdp.it/cximage.htm\ has\ alternative\ library.\nPS.\ One\ possible\ alternative\ would\ be\ to\ preprocess\ the\ images\ of\ great\ size\ with\ \[image\ magick\]\ or\n\[Pixane\]\ and\ load\ them\ as\ TK\[photo\]\ onto\ a\ script\ like\ imagecollection.tcl\ and\ source\ that\nscript\ on\ loading\ the\ program,\ as\ \"\ \[source\]\ imagecollection.tcl\".\ Not\ sure\ that\ one\ can\ defeat\ the\ entropy\ of\ loading\ files,\ but\nthe\ major\ part\ of\ loading\ would\ be\ done\ before\ the\ application\ screen\ came\ up,\ not\ during\ the\nrunning\ of\ the\ application.\n\n\[ABU\]\ 18-may-2011\ :\ I\ think\ solution\ should\ be\ based\ on\ threads\ (tcl-threads\ or\ native\ threads).\ We\ could\ even\ get\ some\ optimized\ code\ as\ that\ ones\ cited,\ but\ until\ image-processing\ is\ synchronous\ (single\ thread),\ GUI\ will\ behave\ quite\ irresponsive.\nSee\ comp.lang.tcl\ \[http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/bacc6f029aa06448/\]\ for\ a\ short\ discussion.\nNote\ that\ we\ can\ load\ an\ image\ in\ a\ slave\ thread,\ but\ then\ passing\ data\ to\ the\ main\ thread\ is\ incredibly\ slow!\ The\ main\ thread\ takes\ more\ time\ to\ get\ a\ (very-large)\ encoded\ string,\ than\ time\ required\ for\ reading\ and\ decoding\ (from\ jpg\ to\ bitmap)\ a\ jpg-file\ !\nTcl-threads\ cannot\ exchange\ data\ very\ quickly,\ since\ they\ have\ no\ notion\ of\ shared-memory\ (or\ better,shared-memory\ (tsv\ package)\ is\ just\ an\ emulation\nachieved\ by\ deep-copying\ 'objects'\ between\ threads).\ Tsv\ is\ fine\ for\ sharing\ small\ data,\ but\ it\ is\ useless\ for\ sharing\ \"images\"\ each\ taking\ up\ several\ megabytes.\n\n----\n**\[Source\]\ vs\ Double-click\ to\ run**\n\[Beware\]\ 2/3/2011:\ \ How\ can\ a\ script\ know\ whether\ it\ was\ sourced\ with\ 'source'\ or\ double-clicked\ in\ windows?\n\n\[tml\]\ 3/30/2011:\ The\ global\ argv0\ variable\ contains\ the\ name\ of\ script\ supplied\ by\ double\ clicking.\ If\ the\ executable\ has\ been\ started\ without\ a\ script,\ argv0\ contains\ the\ name\ of\ the\ executable,\ which\ is\ identical\ to\ the\ result\ of\ an\ 'info\ nameofexecutable'.\ In\ either\ case,\ 'info\ script'\ will\ return\ the\ name\ of\ the\ script\ that's\ currently\ being\ executed\ (i.e.,\ after\ double\ clicking,\ the\ name\ of\ the\ clicked\ script).\ Also,\ please\ don't\ forget\ that\ 'info\ script'\ will\ yield\ the\ name\ of\ a\ source\ file\ only\ while\ it's\ being\ read\ in\ -\ not\ if,\ for\ example,\ a\ procedure\ provided\ by\ that\ source\ file\ is\ called\ later\ (maybe\ by\ a\ button\ you\ clicked).\n\n----\n**Tracing\ in\ Parser\ Tools**\n\[jbr\]\ Hi\ again\ all\ -\ I've\ continued\ to\ play\ with\ the\ very\ nice\ \[Parser\ Tools\]\ packages\ in\ the\ new\ tcllib\ (1.13).\ \ There\ seems\ to\ be\ a\ TRACE\ facility\ that\ would\ be\ very\ useful\ in\ finding\ out\ what\ is\ going\ on\ as\ the\ data\ is\ parsed,\ but\ I\ cannot\ see\ how\ to\ enable\ this\ feature?\n\nThanks\n\n\[AK\]\ I\ am\ sorry,\ the\ TRACE\ facility\ is\ not\ exposed\ to\ user\ control.\ You\ will\ have\ to\ go\ into\ the\ various\ methods\ and\ uncomment\ the\ calls\ to\ TRACE\ to\ activate\ it.\n\n-----\n**Accessing\ Methods\ of\ TclOO**\nIs\ it\ possible\ to\ access\ methods\ of\ a\ TclOO\ object\ without\ using\ \[self\]\ or\ \[my\]?\ -->\ \[Forwarding\ local\ namespace\ proc\ calls\ to\ instance\ methods\ in\ TclOO\]\n\nI've\ mostly\ answered\ my\ own\ question\ but\ would\ like\ some\ feedback\ from\ those\ in\ the\ know.\n\nThanks\ -\ \[jbr\]\n\n\[DKF\]:\ Basically,\ no\ (depending\ on\ what\ you\ mean\ by\ ?access?\ of\ course).\ Methods\ aren't\ commands\;\ at\ the\ C\ level,\ they're\ implemented\ by\ a\ different\ callback\ that\ takes\ an\ extra\ argument\ relative\ to\ commands\ (the\ extra\ value\ describes\ the\ context\ in\ which\ the\ method\ was\ invoked,\ which\ typically\ matters\ ''a\ lot'')\ and\ doing\ it\ that\ way\ allowed\ much\ of\ the\ guts\ of\ \[TclOO\]\ to\ be\ implemented\ simply,\ but\ it\ does\ mean\ that\ methods\ cannot\ be\ executed\ without\ knowing\ what\ object\ they're\ being\ invoked\ upon.\ That's\ in\ turn\ handled\ either\ through\ the\ identity\ of\ the\ public\ object\ command\ (what\ you\ normally\ think\ of\ as\ the\ ?name?\ of\ the\ object)\ or\ the\ identity\ of\ the\ \[my%|%private\ object\ command\],\ which\ is\ typically\ known\ through\ which\ namespace\ is\ declaring\ it.\n\nIf\ you\ want\ to\ forward\ commands\ in\ the\ object\ namespace\ to\ the\ object\ method\ with\ the\ same\ name,\ use\ \[namespace\ unknown\],\ perhaps\ like\ this\ (untested!)\ example\ that\ also\ uses\ \[tailcall\]\ and\ \[my\].\ It\ ''needs''\ to\ be\ invoked\ in\ the\ relevant\ namespace\;\ a\ good\ time\ to\ set\ it\ up\ is\ in\ the\ constructor.\n======\nnamespace\ unknown\ \{tailcall\ my\}\n======\n----\n**regedit\ on\ Windows**\n\[Beware\]\ 18/2/2011\nCalling\n\n======\nexec\ regedit\ /e\ temp.txt\ \"HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Internet\ Explorer\\\\PageSetup\"\n======\n\nwrites\ a\ text\ file\ (readable\ in\ notepad)\ listing\ the\ various\ key/value\ pairs.\n\ndoing\n\n======\nset\ fh\ \[open\ temp.txt\]\nset\ data\ \[read\ \$fh\]\nclose\ \$fh\ntk_messageBox\ -message\ \$data\n======\n\ngives\ me\ three\ random\ characters.\ \ Why\ can't\ I\ read\ the\ data\ in\ the\ file\ properly?\ \ I'm\ guessing\ this\ is\ an\ encoding\ issue\n\n(about\ 2\ minutes\ later)\n\nSorted.\ \ fconfiguring\ to\ -encoding\ unicode\ works...\n\n----\n**Writing\ code\ for\ trails**\n\n\[fs)\ 2011-02-18\ My\ question\ is\ here:\n\n\[Coding\ trails\ for\ hyperlinks\]\ \n\n----\n**Exposing\ TclOO\ variable\ names**\n\[jbr\]\ 2011-02-11\n\nHow\ do\ I\ expose\ the\ state\ of\ TclOO\ objects\ for\ use\ with\ Tk\ and\ variable\ traces?\n\nI've\ been\ using\ TclOO\ for\ a\ few\ months\ now\ and\ have\ come\ to\ like\ it,\ but\ now\ my\ application\ state,\ which\ in\ the\ past\ might\ have\ been\ kept\ in\ a\ global\ array\ or\ set\ of\ global\ variables,\ is\ inside\ one\ of\ more\ objects.\ \ Does\ anyone\ have\ some\ good\ ideas\ about\ how\ to\ get\ the\ value\ in\ an\ object\ onto\ a\ Tk\ widget?\ \ Is\ is\ acceptable\ to\ add\ traces\ to\ variables\ in\ an\ object's\ namespace?\ \ And\ more\ generally\ \"Now\ that\ we\ have\ objects,\ How\ do\ I\ tie\ my\ application\ together?\"\n\nTo\ date\ I've\ written\ methods\ to\ had\ back\ the\ full\ namespace\ path\ to\ specific\ value\ I\ need\ to\ display,\ but\ this\ is\ tedious.\n\nThanks\ -\ John\n\n\[DKF\]:\ TclOO's\ instance\ variables\ actually\ have\ names\ in\ the\ \"global\ naming\"\ hierarchy,\ and\ the\ '''varname'''\ method\ (defined\ by\ \[oo::object\])\ can\ report\ them\ for\ you\;\ it's\ a\ hidden\ method\ by\ default,\ so\ access\ it\ with\ \[my\]\ from\ inside\ your\ methods:\n\n======\n\ \ oo::class\ create\ FooBarGrillLabelExample\ \{\n\ \ \ \ \ \ variable\ x\n\ \ \ \ \ \ constructor\ \{w\}\ \{\n\ \ \ \ \ \ \ \ \ \ label\ \$w\ -textvariable\ \[my\ varname\ x\]\n\ \ \ \ \ \ \}\n\ \ \ \ \ \ method\ setLabel\ \{txt\}\ \{\n\ \ \ \ \ \ \ \ \ \ set\ x\ \$txt\n\ \ \ \ \ \ \}\n\ \ \}\n======\nThis\ method\ also\ works\ great\ for\ integration\ with\ all\ those\ places\ where\ you\ need\ to\ pass\ a\ variable\ name\ into\ Tcl,\ notably\ \[trace\]\ and\ \[vwait\].\n\n\[jbr\]\ -\ Yes\ -\ This\ is\ the\ part\ that\ I\ find\ tedious.\ \ Everything\ needs\ to\ be\ put\ in\ some\ kind\ of\ wrapper.\ \ I've\ solved\ this\ for\ my\ case\ by\ exporting\ varname.\n\n-----\n**Accessing\ the\ help\ pages\ without\ changing\ the\ default\ directory**\n\n\[Didier\]\ (2011-02-09)\ My\ question\ is\ here:\ \[Accessing\ the\ help\ pages\ without\ changing\ the\ default\ directory\]\n\n-----\n**List\ of\ categories\ on\ this\ wiki**\n\n\[Didier\](2011-02-09)\ My\ new\ question\ is\ here:\ \[Where\ to\ find\ the\ list\ of\ categories\ on\ this\ wiki?\]\n\n\[DKF\]:\ The\ place\ to\ go\ is\ the\ \[Category\ Category%|%category\ of\ categories\]\ and\ click\ on\ the\ link\ at\ the\ very\ top\ of\ the\ page\ to\ take\ yourself\ to\ the\ list\ of\ pages\ that\ reference\ the\ metacategory.\ Or\ go\ \[http://wiki.tcl.tk/_/ref?N=2187%|%directly\ there\],\ though\ that's\ less\ mnemonic\ IMO.\n\n------\n**Escapes\ for\ individual\ new\ lines\ in\ a\ CSV\ file**\n\n\[beware\]Quick\ silly\ question\ (I\ think)...\ \ on\ windows,\ \"\\n\"\ matches\ both\ types\ of\ newline.\ \ What\ are\ the\ escapes\ for\ the\ individual\ ones?\ \ I\ have\ a\ CSV\ file\ with\ embedded\ soft\ newlines\ that\ I\ want\ to\ replace.\n\n\[GJS\]\ (2011-02-09)\ I\ believe\ you\ are\ looking\ for\ carriage\ return\ \"\\r\"\ and\ line\ feed\ \"\\f\"\n\n\[Duoas\]\ (2011-02-21)\ The\ \"\\f\"\ escape\ sequence\ is\ for\ Form\ Feed,\ which\ is\ not\ the\ same\ as\ New\ Line.\n\nYou'll\ want\ to\ fconfigure\ your\ stream\ to\ binary\ mode\ and\ look\ for\ \"\\r\\n\",\ which\ is\ CR-LF.\ The\ non-binary\ mode\ is\ for\ use\ on\ non-POSIX\ systems\ to\ turn\ the\ single\ \"\\n\"\ (LF)\ character\ into\ the\ platform-appropriate\ character\ sequence.\ On\ Windows\ that's\ an\ \"\\r\\n\".\n\n-----\n**Running\ two\ copies\ of\ the\ same\ program\ simultaneously**\n\n\[Didier\](Saturday\ February\ 5th\ 2011)\ See:\ \[Opening\ a\ window\ that\ duplicates\ the\ program\ we're\ on\]\ \n\n-----\n**Sizing\ windows**\n\n\[Didier\]\](Saturday\ February\ 5th\ 2011)\ I\ have\ another\ question\ here:\ \[Questions\ related\ to\ windows\].\ Thanks\ again!\n\n----\n**Help\ with\ notebooks**\n'''\[hshang\]\ -\ 2011-03-17\ 12:04:48''':\ \[ttk:notebook\ help\]\n\n<<categories>>\ Discussion\ |\ Development regexp2} CALL {my render {Ask, and it shall be given # 9} **How\ to\ post\ on\ this\ page**\ \n\n\ \ \ \ *\ '''Started\ on:'''\ 2011\ February\ 6th\ (Sunday)\n\ \ \ \ *\ '''Ended\ on:'''\ \n\n------>\ Next:\ See\ \[Ask,\ and\ it\ shall\ be\ given\ #\ 10\]\ \ \ \ \ \ \ \n\n\ \ \ *\ This\ page\ runs\ the\ risk\ of\ being\ deleted\ and\ corrupted.\ Please\ be\ very\ careful\ when\ editing\ it.\ If\ you\ inadvertently\ delete\ it,\ immediately\ revert\ your\ edit\ using\ the\ History\ link\ on\ the\ left\ side\ of\ this\ page.\ \ Do\ NOT\ attempt\ to\ restore\ it\ by\ copying'n'pasting\ the\ text\ from\ a\ previous\ revision,\ or\ all\ page\ formatting\ will\ be\ lost!\n\n\ \ \ *\ Please\ put\ new\ questions\ at\ the\ '''TOP'''\ of\ the\ page,\ so\ that\ as\ the\ page\ grows\ longer,\ new\ questions\ are\ seen\ first.\n\n\ \ \ *\ Also\ please\ put\ a\ section\ header\ on\ top\ of\ every\ question\ and\ put\ two\ stars\ in\ the\ beginning\ of\ the\ title\ and\ two\ stars\ in\ the\ end.\ This\ will\ make\ your\ question's\ section\ easily\ editable.\ \ \n\n\ \ \ *\ Once\ you\ have\ received\ a\ satisfactory\ answer,\ please\ cut\ your\ question\ and\ answer\ directly\ on\ an\ appropriate\ page\ of\ the\ wiki.\ If\ you\ cannot\ find\ an\ existing\ page,\ create\ a\ new\ one.\ \n\n\ \ \ *\ You\ might\ also\ simply\ want\ to\ put\ a\ hyperlink\ leading\ to\ a\ page\ of\ the\ wiki\ where\ your\ question\ is\ included\ like\ Didier\ has\ done\ on\ February\ 5th\ 2011.\ This\ will\ save\ you\ the\ trouble\ of\ cutting\ your\ question\ to\ an\ existing\ page\ afterwards.\ \n\n\n----\n\n**Detecting\ when\ a\ client\ is\ not\ reading\ data\ from\ a\ socket\ (or\ pipe)\ \ as\ fast\ as\ the\ server\ is\ writing**\n\n\[jbr\]\ Any\ ideas\ how\ to\ do\ this?\n\nIt\ seems\ \[puts\]\ will\ block\ or\ push\ data\ in\ the\ background.\ \ If\ it\ is\ interrupted\ with\ \[alarm\]\ it\ happily\ continues.\ \ Here\ is\ a\ small\ patch\ to\ allow\ TclX\ alarm\ to\ interrupt\ blocking\ output\ \[\[puts\]\].\ \ Is\ this\ a\ good\ idea?\n\n======\n\nIndex:\ generic/tclIO.c\n===================================================================\n---\ generic/tclIO.c\n+++\ generic/tclIO.c\n@@\ -2416,16\ +2416,17\ @@\n\ \ \ \ \ \ \ \ \ \ *\ write\ any\ more\ output\ at\ this\ time.\n\ \ \ \ \ \ \ \ \ \ */\n\ \n\ \ \ \ \ \ \ \ \ if\ (written\ <\ 0)\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ /*\n-\ \ \ \ \ \ \ \ \ \ \ \ \ *\ If\ the\ last\ attempt\ to\ write\ was\ interrupted,\ simply\ retry.\n+\ \ \ \ \ \ \ \ \ \ \ \ \ *\ If\ the\ last\ attempt\ to\ write\ was\ interrupted,\ Check\ for\ async\ events\ or\ simply\ retry.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ */\n-\n\ \ \ \ \ \ \ \ \ \ \ \ \ if\ (errorCode\ ==\ EINTR)\ \{\n-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ errorCode\ =\ 0\;\n-\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ continue\;\n+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ (!Tcl_AsyncReady()\ ||\ Tcl_AsyncInvoke(interp,\ TCL_OK)\ ==\ TCL_OK)\ \{\n+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ errorCode\ =\ 0\;\n+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ continue\;\n+\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ \ \ \ \ \ /*\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ *\ If\ the\ channel\ is\ non-blocking\ and\ we\ would\ have\ blocked,\ start\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ *\ a\ background\ flushing\ handler\ and\ break\ out\ of\ the\ loop\n\n----\n**Connection\ to\ a\ C\ program\ from\ Tcl**\n\n\[Gerry\ W.\]\ I\ like\ a\ lot\ the\ way\ I'm\ able\ to\ run\ a\ C\ code\ from\ TCL.\ I\ do\ have\ a\ problem\ however\ albeit\ a\ small\ one.\ I\ enter:\ long\ opening\ bracket\ c:/Data/Cprogram.exe\ long\ closing\ bracket.\ No\ problem\ everything\ works\ fine.\ The\ problem\ is\ this:\ I\ simply\ need\ the\ Tcl\ program\ to\ look\ up\ the\ name\ of\ a\ datafile\ in\ a\ location,\ to\ take\ the\ 5\ last\ digits\ of\ the\ path\ and\ to\ put\ them\ next\ to\ long\ opening\ bracket\ c:/Data/Cprogram.exe\ long\ closing\ bracket.\ How\ do\ I\ do\ all\ that.\ \n\nLet\ me\ be\ more\ specific.\ The\ program\ in\ C\ modifies\ data\ and\ the\ name\ of\ the\ file\ to\ modify\ must\ be\ written\ at\ the\ command\ line\ next\ to\ the\ C\ program.\ Ex:If\ I\ go\ on\ c:/Data/\ and\ I\ type\ Cprogram.exe\ Data1,\ the\ Data1\ file\ will\ be\ treated.\ \n\nDoes\ my\ putting\ in\ bracket\ correspond\ to\ an\ entry\ at\ the\ prompt?\ \ \ \ \ \ \n\n----\n**The\ realize\ of\ Gaussian\ stochastic\ process\ through\ TCL/TK**\n\nDear\ all,\ I\ want\ to\ produce\ a\ vector\ Gaussian\ stochastic\ process\ '''h(t)'''\ with\ statistical\ properties\ <hi(t)>=0\ and\ <hi(t)hj(s)>=Dδijδ(t-s),\ where\ i\ and\ j\ are\ the\ Cartesian\ indices.\ D\ is\ constant\ number,δij\ and\ δ(t-s)\ are\ Kronecker\ δ\ and\ Dirac\ δ.\ How\ could\ I\ write\ it\ with\ TCL/TK?\nMuch\ thanks.\n\n----\n**\ Native\ \[MDI\]\ extension\ for\ Windows**\ \n\n\[MG\]\ Anyone\ know\ of\ a\ native\ \[MDI\]\ extension\ for\ Windows\ anywhere?\ I'm\ sure\ I\ saw\ one\ once,\ but\ can't\ find\ any\ mention\ of\ it\ now.\ Thanks\ for\ your\ help.\n\n----\n**\ Precompiled\ threaded\ 8.5\ tclkit\ for\ OSX**\n\n\[Ro\]\ 2011-09-16\ Anyone\ have\ a\ precompiled\ threaded\ 8.5\ tclkit\ for\ OSX?\ I\ use\ \[Pat\ Thoyts\]'s\ builds\ for\ Linux\ and\ Windows\ and\ they\ work\ great\ (8.5.9\ tclkit\ threaded),\ but\ Roy\ Keene's\ latest\ http://rkeene.org/projects/info/wiki/Tclkits\ isn't\ threaded\ on\ OSX.\ Thanks!\n\nSupposedly\ the\ basekit\ provided\ by\ \[ActiveState\]\ is\ multithreaded\ on\ OS\ X\ but\ is\ it\ free\ to\ use\ for\ any\ use?\n\n\[YS\]\ Look\ at\ result\ of\ this\ script:\n======\ncanvas\ .c\ -bg\ white\ngrid\ .c\nset\ x1\ 20\nset\ x2\ 22\nset\ y2\ 105\nfor\ \{set\ f\ 0\}\ \{\$f<50\}\ \{incr\ f\}\ \{\n\ \ \ \ set\ y1\ \[expr\ \{\$y2-0.05*\$f\}\]\n\ \ \ \ .c\ create\ rectangle\ \$x1\ \$y1\ \$x2\ \$y2\ -fill\ black\n\ \ \ \ incr\ x1\ 2\n\ \ \ \ incr\ x2\ 2\n\ \ \ \ \}\n======\nOn\ Windows\ XP\ I\ see\ that\ at\ left\ side\ of\ figure\ bottom\ margin\ is\ one\ pixel\nlower\ than\ at\ right\ side.\ But\ it\ shouldn't\ happen\ as\ y2\ is\ the\ same\ (105)\ for\nall\ rectangles.\ What\ do\ you\ think?\n\n----\n**Using\ TCOM\ to\ make\ DNS\ changes\ via\ WMI**\n\nFor\ more\ detail\ about\ this\ question\ see\ http://wiki.tcl.tk/1821\n\nResolved,\ follow\ link\ to\ see\ examples.\n\n----\n**Tclkit\ does\ not\ run\ on\ my\ PC**\n\n\[wdb\]\ Aug\ 26\ 2011\ --\ yesterday\ bought\ and\ unpacked\ my\ PC,\ installed\ SuSE\ Linux,\ downloaded\ Tclkit\ from\ equi4.\n\n======\nwolf@linux-t1xi:~/Downloads>\ ls\ -l\ninsgesamt\ 1440\n-rwxr-xr-x\ 1\ wolf\ users\ 1472785\ 26.\ Aug\ 06:16\ tclkit-linux-x86-8.5.1\nwolf@linux-t1xi:~/Downloads>\ ./tclkit-linux-x86-8.5.1\ \nbash:\ ./tclkit-linux-x86-8.5.1:\ Kann\ die\ Datei\ nicht\ ausführen.\n======\n\nTranslation:\ could\ not\ execute\ program\ file.\ No\ explanation.\ Any\ suggestions\ what\ went\ wrong?\n\nI\ just\ tried\ it.\ File\ had\ a\ slightly\ different\ name,\ but\ problem\ was\ it\ had\nbeen\ doubly\ gzipped.\ I\ had\ to\ gunzip\ twice,\ then\ it\ worked.\n\nIan\n\n\[wdb\]\ Many\ thanks!\ My\ life\ has\ as\ sense\ again\ \;-)\n\n----\n**tcom\ package\ in\ 64-bit\ windows\ or\ 64-bit\ alternative**\n\[jrs\]\ Aug\ 19\ 2011\ -\ I'm\ trying\ to\ port\ a\ project\ that\ relies\ heavily\ on\ tcom\ for\ office\ automation.\ \ Part\ of\ the\ requirements\ for\ this\ port\ is\ that\ it\ runs\ on\ 64-bit.\ \ Therefore,\ I'm\ trying\ to\ compile\ the\ tcom\ project\ in\ 64-bit.\n\nUnfortunately\ it\ does\ not\ compile,\ due\ to\ some\ in-line\ assembly\ code\ that\ is\ used.\ \ Here\ is\ a\ snippet\ of\ the\ culprit\ C\ code:\n======\nstatic\ __declspec(naked)\ void\ndelegate\ (void)\n\{\n\ \ \ \ __asm\ \{\n\ \ \ \ \ \ \ \ push\ ebp\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ set\ up\ simple\ stack\ frame\n\ \ \ \ \ \ \ \ mov\ \ ebp,\ esp\n\n\ \ \ \ \ \ \ \ sub\ \ esp,\ 8\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ set\ up\ local\ variables\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ localVar(hrFromInvoke)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ localVar(pArgEnd)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ ebp\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ funcIndex\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ retAddr\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ this\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ args\n\n\ \ \ \ \ \ \ \ call\ invokeComObjectFunction\n\n\ \ \ \ \ \ \ \ //\ The\ following\ code\ adjusts\ the\ stack\ and\ returns\ to\ the\ caller.\n\ \ \ \ \ \ \ \ //\ This\ involves\ copying\ the\ return\ address\ and\ the\ HRESULT\n\ \ \ \ \ \ \ \ //\ to\ the\ bottom\ of\ the\ stack\ frame,\ adjusting\ the\ stack\n\ \ \ \ \ \ \ \ //\ pointer,\ and\ returning\ to\ the\ caller.\n\ \ \ \ \ \ \ \ push\ esi\n\ \ \ \ \ \ \ \ mov\ \ esi,\ \[ebp-4\]\ \ \ \ \ \ \ //\ esi\ =\ address\ after\ last\ argument\n\n\ \ \ \ \ \ \ \ sub\ \ esi,\ 4\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ esi\ points\ to\ bottom\ arg\ on\ stack\n\ \ \ \ \ \ \ \ mov\ \ eax,\ \[ebp+8\]\ \ \ \ \ \ \ \ //\ copy\ retaddr\ down\n\ \ \ \ \ \ \ \ mov\ \ \[esi\],\ eax\n\n\ \ \ \ \ \ \ \ sub\ \ esi,\ 4\n\ \ \ \ \ \ \ \ mov\ \ eax,\ \[ebp-8\]\ \ \ \ \ \ \ \ //\ copy\ hrFromInvoke\ down\n\ \ \ \ \ \ \ \ mov\ \ \[esi\],\ eax\n\ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ mov\ \ eax,\ esi\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ //\ reset\ stack\ and\ return\ to\ caller\n\ \ \ \ \ \ \ \ pop\ \ esi\n\ \ \ \ \ \ \ \ mov\ \ ebp,\ \[ebp\]\n\ \ \ \ \ \ \ \ mov\ \ esp,\ eax\n\ \ \ \ \ \ \ \ pop\ \ eax\n\ \ \ \ \ \ \ \ ret\n\ \ \ \ \}\n\}\n======\nSo\ my\ options\ seem\ to\ be\ to\ either\ figure\ out\ how\ to\ get\ this\ code\ working\ on\ 64-bit\ or\ find\ an\ alternative\ to\ tcom.\ \ I've\ already\ investigated\ trying\ to\ get\ this\ code\ working\ in\ 64-bit\ and\ it\ seems\ it\ could\ be\ possible\ using\ MASM,\ but\ unfortunately\ my\ attempts\ at\ this\ method\ were\ without\ success.\ \ The\ only\ alternative\ I\ found\ was\ package\ optcl.\ \ I\ downloaded\ it\ but\ I'm\ still\ investigating\ if\ it\ will\ be\ a\ suitable\ replacement.\n\nAny\ suggestions\ would\ be\ greatly\ appreciated.\n\nThanks,\nJosh\n\nAnswer:\ So\ I\ ended\ up\ emailing\ the\ author\ of\ tcom\ and\ he\ suggested\ I\ download\ the\ latest\ beta\ release\ of\ tcom\ which\ has\ an\ included\ define\ that\ can\ disable\ this\ \"vtable\"\ if\ it\ isn't\ needed.\ \ Luckily\ the\ project\ I'm\ upgrading\ does\ not\ use\ this\ vtable,\ so\ I\ was\ able\ to\ simply\ remove\ the\ preprocessor\ definition\ from\ the\ project\ settings.\ \ It\ now\ compiles\ fine\ as\ 64-bit.\n\nmhofmann\ (2011-09-19)\ Putting\ the\ assembly\ stuff\ into\ a\ freestanding\ MASM64-Module\ was\ exactly\ the\ thing\ I've\ done\ a\ while\ ago.\nAnd\ it\ did\ work!\nDue\ to\ different\ calling\ conventions,\ ComObject.cpp\ and\ ComObject.h\ also\ had\ to\ be\ adapted.\n\nIf\ you\ are\ or\ anybody\ is\ interested,\ you\ can\ find\ the\ source\ files\ at\ http://www.tin-pot.coco.mydisk.se/\ \n\nIn\ the\ Download\ folder\ there,\ I\ provide\n\n\ \ \ *\ a\ tcom64.zip\ archive,\ containing\ the\ Tcom\ 64\ library/tcom\ files\ (dll's\ etc)\ and\n\ \ \ *\ a\ simple\ installer\ for\ a\ 64\ bit\ Tcl8.6\ distro,\ including\ the\ tcom\ stuff.\n\nHope\ that\ helps,\n\nMartin\ \n\n----\n**Show\ activity\ in\ a\ ttk::notebook\ tab**\n\[MG\]\ Aug\ 19\ 2011\ -\ I'm\ hoping\ to\ use\ a\ \[ttk::notebook\]\ for\ an\ app,\ but\ I\ need\ some\ way\ to\ show\ when\ there's\ activity\ in\ a\ tab.\ The\ only\ option\ I\ can\ see\ so\ far\ is\ using\ an\ -image\ and\ changing\ it\ when\ there's\ activity,\ but\ that's\ not\ going\ to\ be\ very\ obvious.\ Ideally,\ I'd\ like\ to\ flash\ the\ tab\ or\ something\ like\ that,\ but\ have\ no\ idea\ if\ that's\ possible.\ I've\ looked\ through\ the\ ttk\ theme\ files\ and\ can't\ see\ anything\ helpful,\ or\ in\ the\ docs.\ Can\ anyone\ suggest\ anything?\ Thanks\ for\ your\ help.\n\n----\n**Suggestion\ Box?**\n\[gold\]\ 5aug2011:\ Does\ this\ TCL\ wiki\ have\ an\ obvious\ suggesion\ box?\ thanks.\ \n\n----\n**Problems\ with\ Set\ total**\n\n\[gold\]\ 11jul2011,\ problems\ with\ set\ total\ ...\ sexagesimal\ conversion\ is\ supposed\nto\ be\ 30/60\ or\ 0.5.\n\[gold\]17jul2011.\ Fixed\ problem,\ closed\ out.\n\n----\n**Tcl\ syntax**\nI\ was\ just\ over\ at\ RosettaCode.\ They've\ marked\ Tcl\ as\ not\ capable\ of\ inverted\ syntax\ http://rosettacode.org/wiki/Inverted_syntax\ .\ I'm\ pretty\ sure\ they're\ wrong\ ...\ \[BMA\]\n\n\[RLE\]\ (2011-06-27)\ While\ they\ will\ likely\ say\ that\ this\ fails\ for\ some\ reason\ they\ make\ up\ after\ the\ fact,\ but\ it\ would\ seem\ that\ \[do...until\ in\ Tcl\]\ would\ qualify\ for\ their\ definition\ of\ inverted\ syntax.\n\n\[DCD\]\ (2011-07-11)\ I\ pasted\ do.tcl\ into\ the\ RosettaCode\ page\ -\ and\ added\ an\ ugly\ hack\ using\ unknown\ that\ should\ qualify\ as\ truly\ inverted.\n\n----\n**Memory\ pre-allocation**\n\n\[DVB\]\ (2011-06-19)\ Is\ there\ a\ way\ to\ pre-allocate\ a\ defined\ amount\ of\ memory\ before\ the\ interp\ use\ it?\nIt\ would\ be\ like\ a\ guarantee\ that\ it\ will\ be\ worth\ to\ start\ processing.\n\nThanks\ in\ advance.\n\n\[gold\]\ 28jun2011,\ Found\ some\ references\ on\ \[memory\].\ \n\ \ \ *\ http://www.tcl.tk/man/tcl8.6/TclCmd/memory.htm\n\ \ \ *\ http://www.astro.princeton.edu/~rhl/Tcl-Tk_docs/tcl/Alloc.3.html\n\ \ \ *\ http://www.astro.princeton.edu/~rhl/Tcl-Tk_docs/tcl/Interp.3.html\n\ \ \ *\ http://rosettacode.org/wiki/Memory_allocation\n\ \ \ *\ http://rosettacode.org/wiki/Machine_Address\n\ \ \ *\ http://www.digital-smarties.com/Tcl2002/critcl.pdf\n\ \ \ *\ http://equi4.com/starkit/critcl.html\n\ \ \ *\ http://en.wikipedia.org/wiki/Malloc\n\ \ \ *\ http://valgrind.org/info/about.html\nIf\ you\ are\ on\ windows,\nthe\ \[twapi\]\ extension\ will\ obtain\ get_memory_info.\n======\n\ console\ show\n\ package\ require\ twapi\n\ set\ maximum_memory\ \[expr\ \{1.*1E9\}\]\n\ set\ memory_physical\ \[lindex\ \[::twapi::get_memory_info\ -totalphysical\]\ 1\]\n\ if\ \{\$memory_physical\ \ <\ \$maximum_memory\}\ \{\ puts\ \"\ memory\ \$memory_physical\ \ \"\;\ \n\ error\ \"\ out\ of\ memory\ \$memory_physical\ \"\ \ \}\n======\n\n----\n**Recursive\ Lists**\n\nI\ Want\ a\ Tcl\ script\ which\ does\ the\ foolowing:\n\ \ \ \ :\ \ \ procedure\ to\ generate\ a\ single\ list,\ by\ reading\ the\ user\ input\ from\ command\ line.\ne.g.\ User\ Inputs:\ `\{1\ 5\ 23\ \{abc\ 23\ \{564\ abc\}\}\}\ 1\ 5\ \{56\ rrf\ 45\ \{127\ 458\}\}`<<br>>\nSo\ how\ to\ output\ index\ of\ each\ element...\n\nThat\ is,\ if\ 23\ should\ output\ index\ :\ 20<<br>>\nabc\ :\ 300<<br>>\nPlease\ help\n\nThanks,\nLeo\n\n\[gold\]\ 11jun2011,Recommend\ \ proc\ lflatten\ \{\ list\ \}\ of\ \[cyrilroux\]\ from\ \[list\].\nNested\ list\ is\ most\ intractable\ of\ all\ inputs,\ but\ the\ \nscript\ below\ takes\ your\ multiple\ nests\ and\ throws\ out\ a\n1\ element1\ 2\ element2\ ...\ N\ elementN\ \ output\ for\ loading\ into\ \nkeyed\ lists\ and\ arrays.\ Refs.\[keyed\ list\],\[dict\],\[list\ stripping\],\[args\],\[I\ love\ foreach\].\ Proc\ keyget\ from\ \ \[Additional\ list\ functions\]\nis\ also\ possible\ as\ example\ below:\ keyget\ \{\$outty\}\ 4.\ \nConsole\ input\ is\ king\ \{\ nested\ list\ \}.\ On\ many\ unix\ systems,\ input\ args\ \nwill\ work\ better\ as\ example:\ proc\ king\ \{args\}\ \{...source\ \[Recursive\ list\ searching\].tcl\;\nlrsearch\ \$args\ abc\;set\ aa\ \[\ lflatten\ \$args\ \]..\}.Search\ \"args*\"\ on\ wiki\ search\ engine\ for\ more\ examples.\n\n======\ \ \n\ #\ written\ on\ etcl\ console\ and\ windows\ XP\n\ \ \ console\ show\n\ \ \ \ global\ lister5\ bush\n\ \ \ \ set\ jack\ \[list\ \{1\ 5\ 23\ \{abc\ 23\ \{564\ abc\}\}\}\ 1\ 5\ \{56\ rrf\ 45\ \{127\ 458\}\}\]\n\ \ \ \ puts\ \"\ \ \$jack\ \ \ \ \"\n\ \ \ \ set\ outty\ \[list\]\n\ \ \ \ \ \ \ \ \ \ \ \ proc\ lflatten\ \{\ list\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ regsub\ -all\ \{^\\\{|\ \\\{|\\\{\\\{+|\\\}\$|\\\}\ |\\\}\\\}+\}\ \$list\ \{\ \}\ flatten\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \$flatten\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ \;#\ cyrilroux\ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ proc\ keyget\ \{list\ key\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ foreach\ \{lkey\ value\}\ \$list\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \[string\ equal\ \$lkey\ \$key\]\ \{return\ \$value\}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \;#\ RS\n\ \ \ \ \ \ \ \ \ \ \ \ proc\ advisorx\ \{aa\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"input\ has\ form\ of\ king\ \{\ list\ \}\ \ \"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"advisor:\ new\ list????\ \"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ proc\ king\ \{\ aa\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ global\ lister5\ bush\ \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ counterx\ 1\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ outty\ \[list\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ aa\ \[\ lflatten\ \$aa\ \]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ foreach\ item\ \$aa\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ outty\ \$counterx\ \$item\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ incr\ counterx\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"\ decision\ was\ \ ,\ total\ counters\ was\ \$counterx\ \ \ \"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"\ \[lflatten\ \$aa\ \]\"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"keyed\ \ \ \$outty\ \"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ puts\ \"\ keyget\ \[keyget\ \$outty\ 4\]\"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ advisorx\ \{aa\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ puts\ \"input\ has\ form\ of\ king\ \{\ list\ \}\ \ \"\n======\n----\n**\[menu\]\ radiobutton\ support\ with\ \[menubutton\]\ and\ \[ttk::menubutton\]\ on\ \[Mac\ OS\ X\]**\n\n\[Aud\]\ (2011-05-15)\ It\ is\ just\ me,\ or\ do\ menu\ radiobutton\ items\ act\ just\ like\ plain\ old\ command\ items\ (no\ tick\ displayed\ when\ selected\ via\ -variable),\ when\ the\ menu\ is\ assigned\ to\ either\ the\ standard\ Tk\ or\ the\ Ttk\ menubutton\ widgets\ under\ OS\ X?\ Running\ the\ same\ code\ under\ Linux\ gives\ me\ the\ expected\ behaviour\ (a\ radiobutton\ item\ shown\ as\ selected\ when\ menubutton\ clicked).\n\nMenus\ assigned\ to\ an\ OS\ X\ \[toplevel\]\ don't\ have\ this\ issue,\ and\ as\ far\ as\ I\ can\ tell\ from\ other\ OS\ X\ apps,\ Cocoa\ probably\ supports\ natively.\ Then\ again,\ isn't\ Tk\ 8.5\ still\ using\ Carbon?\ Maybe\ that's\ got\ something\ to\ do\ with\ this?\n\nExample\ for\ clarity:\n======\npackage\ require\ Tk\npackage\ require\ Ttk\n\nttk::menubutton\ .test\ -menu\ .menu\ -textvariable\ menu_value\npack\ .test\n\nset\ menu_value\ 1\nmenu\ .menu\n.menu\ add\ radiobutton\ -label\ One\ -variable\ menu_value\ -value\ 1\n.menu\ add\ radiobutton\ -label\ Two\ -variable\ menu_value\ -value\ 2\n======\n\n----\n**How\ does\ \"fieldbackground\"\ work\ at\ ttk::treeview?**\nenel\ (2011-05-09)\n\nA\ small\ test:\n======\n\ \ \ \ package\ require\ Tk\n\ \ \ \ package\ require\ tile\ 0.7.8\n\ \ \ \ frame\ .f\ -background\ red\ -border\ 10\n\ \ \ \ ttk::style\ configure\ Treeview\ -fieldbackground\ green\n\ \ \ \ ttk::style\ configure\ Treeview.Row\ -background\ green\n\ \ \ \ ttk::treeview\ .f.tv\ -columns\ \{name\ state\}\n\ \ \ \ .f.tv\ heading\ #0\ -text\ Id\n\ \ \ \ .f.tv\ heading\ name\ -text\ Name\n\ \ \ \ .f.tv\ heading\ state\ -text\ State\n\ \ \ \ \ \n\ \ \ \ .f.tv\ insert\ \{\}\ end\ -text\ 1\ -values\ \{John\ OH\}\n\ \ \ \ .f.tv\ insert\ \{\}\ end\ -text\ 2\ -values\ \{James\ WV\}\n\ \ \ \ .f.tv\ configure\ -style\ Treeview\n\ \ \ \ pack\ .f.tv\ .f\ -fill\ both\ -expand\ true\n======\nHow\ can\ I\ color\ the\ empty\ part\ of\ the\ treeview?\nI\ used\ manual\ \[ttk::style\ examples\].\n\n\[RLE\]\ (2011-05-09)\ Unless\ something\ has\ changed\ since\ that\ page\ was\ written\ (it\ was\ for\ 8.5.8,\ what\ version\ are\ you\ using?),\ your\ test\ should\ have\ worked\ and\ should\ have\ colored\ the\ empty\ portion\ green.\ \ What\ did\ you\ see\ happening\ instead?\n\n\[enel\]\ (2011-05-09)\n======\n\n-\ TK_VERSION='8.5'\n-\ TK_MAJOR_VERSION='8'\n-\ TK_MINOR_VERSION='5'\n-\ TK_PATCH_LEVEL='.8'\n-\ tile-0.8.4.0\n======\nMy\ http://web.barczi.hu/enel/tek-tips/tv_00.jpg%|%\"result\"%|%\ is.\n\n\[RLE\]\ (2011-05-10)\ When\ I\ paste\ your\ unchanged\ example\ above\ into\ a\ wish\ on\ Linux\ (also\ 8.5.8),\ I\ get\ a\ full\ green\ background\ for\ the\ entire\ treeview\ area.\ \ When\ I\ try\ 8.5.9\ under\ WinXP\ I\ get\ a\ white\ background\ for\ the\ entire\ treeview.\ \ It\ appears\ that\ there\ is\ some\ kind\ of\ override\ happening\ on\ windows\ that\ does\ not\ happen\ on\ Linux.\ \ You\ might\ want\ to\ try\ asking\ your\ question\ on\ comp.lang.tcl\ in\ this\ case.\n\n\[enel\]\ (2011-06-11)\ Thanks\ the\ idea,\ I\ did\ it.\ I\ haven't\ got\ any\ answer\ for\ a\ month,\ so\ I\ \"close\"\ (give\ up)\ this\ topic.\n\n\[RLE\]\ (2011-06-11)\ That\ is\ too\ bad.\ \ You\ have\ either\ discovered\ a\ bug,\ or\ you\ have\ discovered\ a\ manner\ in\ which\ the\ Win\ version\ just\ works\ differently.\ \ But\ we\ don't\ know\ which\ outcome\ (bug\ or\ difference)\ is\ correct.\n\n\[enel\]\ (2011-07-02)\nWhen\ a\ windows-exe\ generated\ by\ tclkit\ the\ unconfigurable\ territory\ is\ red\ colored.\nMy\ http://web.barczi.hu/enel/tek-tips/tv_01.jpg%|%\"exe-result\"%|%\ is.\n\n----\n**\[How\ to\ run\ external\ script\ from\ Tk\ and\ make\ it\ throw\ output\ to\ the\ console?\]**\n\[gold\]\ 2011-05-10,\nPerhaps,\ \[exec\],\ \nhttp://www.tcl.tk/man/tcl8.5/TclCmd/exec.htm,\ \ \nhttp://www.tcl.tk/faq/tclwin.htm,\nhttp://www.tcl.tk/man/tcl/tutorial/Tcl26.html,\n\[A\ minimal\ console\],\ and\ http://www.tcl.tk/software/plugin/eval.html\nwould\ be\ a\ good\ place\ to\ start.\n\nA\ session\ from\ the\ Etcl\ console\ on\ a\ an\ XP\ windows.\n======\ \n\ \ \ \ 2%\ exec\ etcl.exe\ king4.tcl\ \n\ \ \ \ 9%\ exec\ king4.exe\ #\ using\ freewrap\ compiled\ tcl\ executable\n\ \ \ \ 11%\ eval\ exec\ etcl.exe\ king4.tcl\n\ \ \ \ 12%\ set\ output5\ \[exec\ etcl.exe\ external_script_king4.tcl\ \]\n\ \ \ \ 15%\ puts\ \$output5\n\ \ \ \ 17%\ set\ tip\ \[\ more\ king4.tcl\]\ #using\ \ more\ to\ grab\ script\n\ \ \ \ 16%\ eval\ \$tip\n\ \ \ \ 17%\ console\ eval\ \$tip\ #\ may\ overwrite\ console\ display\ or\ functions\n\ \ \ \ \ load\ hello.tcl\ (text\ file)\ as\ one\ line,\ puts\ \"overwrite\ hello\"\n\ \ \ \ 18%\ source\ hello.tcl\ #should\ see\ \"overwrite\ hello\"\ on\ console\ window\n\ \ \ \ \ load\ pie.tcl\ (text\ file)\ as\ one\ line,\ proc\ pi\ \{\}\ \{expr\ acos(-1)\}\n\ \ \ \ \ 19%\ source\ pie.tcl\n\ \ \ \ \ 20%\ set\ piepie\ \[\ pi\ \]\;\ puts\ \$piepie\n\ \ \ \ \ \ \ \ \ answer:\ 3.141592653589793\n======\nThe\ \[Combining\ Fortran\ and\ Tcl\ in\ one\ program\]\ \ and\ \[Managing\ Fortran\ programs\]\nare\ some\ starter\ code\ for\ \ncalling\ on\ external\ programs\ and\ external\ scripts.\nAlso,\ the\ pull\ down\ menu\ on\ the\ etcl\ console\ has\nbuttons\ for\ sourcing\ and\ executing\ TCL\ code.\n----\n**Window\ configuration\ does\ not\ follow\ the\ sizegrip\ while\ the\ window\ manager\ does**\n\nI\ added\ a\ ttk::sizegrip\ to\ a\ window\ to\ give\ the\ user\ the\ possibility\ resizing\ the\ window\ to\ his/her\ needs.\ Unfortunately,\ the\ window\ contents\ is\ not\ resized\ when\ the\ sizegrip\ is\ dragged\ but\ the\ window\ frame\ added\ \nby\ the\ window\ manager\ gets\ the\ expected\ size.\ The\ same\ effect\ occurs\ if\ the\ window\ is\ resized\ by\ the\ window\ manager\ directly\ (whether\ or\ not\ a\ sizegrip\ is\ present).\ What\ can\ I\ do\ to\ resize\ the\ window\ contents?\n\nThe\ platform\ used:\ \n======\n-\ SunOS\ 5.10\ Generic_144488-08\ sun4u\ sparc\ SUNW,Sun-Fire-V440\ Solaris\n-\ Tcl\ version\ 8.5\ ,\ Tk\ version\ 8.5\n-\ Tcl/Tk\ compiled\ from\ sources\ by\ gcc\ (pre-installed\ is\ version\ 8.4)\n======\n\nA\ small\ test\ program\ follows\ (modifying\ the\ \"sticky\"\ settings\ has\ no\ effect\ here):\n======\n#!/bin/sh\n#\ the\ next\ line\ restarts\ using\ wish\ \\\nexec\ wish\ \"\$0\"\ \"\$@\"\n\n#\ Fill\ window\ by\ some\ stuff:\nttk::frame\ .top\ngrid\ .top\ -row\ 0\ -column\ 0\ -sticky\ nswe\ngrid\ \[ttk::label\ .top.label\ -text\ \"Test\"\]\ -row\ 0\ -column\ 0\ -sticky\ w\nttk::button\ .top.button\ -text\ \"Close\"\ -command\ \{\ exit\ \}\ngrid\ .top.button\ -row\ 0\ -column\ 1\ -sticky\ e\ngrid\ \[ttk::label\ .top.status\ -text\ \"Status\"\]\ -row\ 1\ -column\ 0\ -columnspan\ 2\ -sticky\ we\n#\ Add\ sizegrip:\ngrid\ \[ttk::sizegrip\ .top.grip\]\ -row\ 1\ -column\ 2\ -sticky\ se\n======\n\n\[RLE\]\ (2011-04-06):\ Grids\ by\ default\ do\ not\ automatically\ expand\ when\ their\ container\ expands.\ \ You\ need\ to\ tell\ the\ grid\ manager\ how\ you\ want\ the\ various\ rows\ and\ columns\ to\ expand.\ \ Take\ a\ look\ at\ the\ \"-weight\"\ option\ to\ the\ grid\ columnconfigure\ and\ grid\ rowconfigure\ sub-commands.\n\nFor\ your\ example\ above,\ while\ I\ don't\ know\ exactly\ how\ you\ would\ want\ it\ to\ expand,\ if\ you\ do:\n======\ngrid\ rowconfigure\ .\ 0\ -weight\ 1\ngrid\ columnconfigure\ .\ 0\ -weight\ 1\ngrid\ rowconfigure\ .top\ 0\ -weight\ 1\ngrid\ columnconfigure\ .top\ 0\ -weight\ 1\n======\nThen\ your\ grid\ layout\ will\ expand/contract\ with\ changes\ in\ the\ window\ size\ (although\ maybe\ not\ expand/contract\ the\ way\ you\ want).\n----\n**Multithreaded\ Image\ Processing**\n\n\[tml\]\ 3/30/2011:\ I\ need\ to\ load\ and\ process\ quite\ a\ lot\ of\ big\ image\ files,\ and\ loading\ a\ single\ image\ alone\ will\ take\ about\ 3\ seconds,\ which\ makes\ my\ GUI\ quite\ irresponsive.\ Is\ it\ possible\ to\ load\ and\ process\ an\ image\ in\ a\ secondary\ thread\ and\ then\ transfer\ that\ image\ to\ my\ main\ thread\ in\ a\ similar\ manner\ as\ that's\ already\ possible\ for\ channels\ ...\ maybe\ by\ writing\ some\ C\ code\ for\ that\ purpose?\n\n\[gold\]\ 5/16/2011.\ Found\ refs.\ If\ you\ can\ work\ with\ thumbnails,\ a\ tcl\ or\ perl\ script\ can\ use\ imagemagick\ to\ thumbnail\ every\ image\ in\ a\ directory\ or\ tailor\ to\ specific\ megabyte\ size.\n\ \ \ *\ http://www.neatware.com/myrmecox/studio/ex_tclmagick.html,\n\ \ \ *\ http://members.shaw.ca/el_supremo/TclWand_053.zip,\n\ \ \ *\ http://www.evolane.com/software/pixane/pixane.html\nEspecially\ look\ at\ \[Fast\ image\ resizing\],\ which\ implies\ you\ might\ have\ to\ compile\nthe\ TCL\ code\ (possibly\ \[Freewrap\]\ if\ speed\ alone\ is\ consideration.\nAlso,\ http://www.xdp.it/cximage.htm\ has\ alternative\ library.\nPS.\ One\ possible\ alternative\ would\ be\ to\ preprocess\ the\ images\ of\ great\ size\ with\ \[image\ magick\]\ or\n\[Pixane\]\ and\ load\ them\ as\ TK\[photo\]\ onto\ a\ script\ like\ imagecollection.tcl\ and\ source\ that\nscript\ on\ loading\ the\ program,\ as\ \"\ \[source\]\ imagecollection.tcl\".\ Not\ sure\ that\ one\ can\ defeat\ the\ entropy\ of\ loading\ files,\ but\nthe\ major\ part\ of\ loading\ would\ be\ done\ before\ the\ application\ screen\ came\ up,\ not\ during\ the\nrunning\ of\ the\ application.\n\n\[ABU\]\ 18-may-2011\ :\ I\ think\ solution\ should\ be\ based\ on\ threads\ (tcl-threads\ or\ native\ threads).\ We\ could\ even\ get\ some\ optimized\ code\ as\ that\ ones\ cited,\ but\ until\ image-processing\ is\ synchronous\ (single\ thread),\ GUI\ will\ behave\ quite\ irresponsive.\nSee\ comp.lang.tcl\ \[http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/bacc6f029aa06448/\]\ for\ a\ short\ discussion.\nNote\ that\ we\ can\ load\ an\ image\ in\ a\ slave\ thread,\ but\ then\ passing\ data\ to\ the\ main\ thread\ is\ incredibly\ slow!\ The\ main\ thread\ takes\ more\ time\ to\ get\ a\ (very-large)\ encoded\ string,\ than\ time\ required\ for\ reading\ and\ decoding\ (from\ jpg\ to\ bitmap)\ a\ jpg-file\ !\nTcl-threads\ cannot\ exchange\ data\ very\ quickly,\ since\ they\ have\ no\ notion\ of\ shared-memory\ (or\ better,shared-memory\ (tsv\ package)\ is\ just\ an\ emulation\nachieved\ by\ deep-copying\ 'objects'\ between\ threads).\ Tsv\ is\ fine\ for\ sharing\ small\ data,\ but\ it\ is\ useless\ for\ sharing\ \"images\"\ each\ taking\ up\ several\ megabytes.\n\n----\n**\[Source\]\ vs\ Double-click\ to\ run**\n\[Beware\]\ 2/3/2011:\ \ How\ can\ a\ script\ know\ whether\ it\ was\ sourced\ with\ 'source'\ or\ double-clicked\ in\ windows?\n\n\[tml\]\ 3/30/2011:\ The\ global\ argv0\ variable\ contains\ the\ name\ of\ script\ supplied\ by\ double\ clicking.\ If\ the\ executable\ has\ been\ started\ without\ a\ script,\ argv0\ contains\ the\ name\ of\ the\ executable,\ which\ is\ identical\ to\ the\ result\ of\ an\ 'info\ nameofexecutable'.\ In\ either\ case,\ 'info\ script'\ will\ return\ the\ name\ of\ the\ script\ that's\ currently\ being\ executed\ (i.e.,\ after\ double\ clicking,\ the\ name\ of\ the\ clicked\ script).\ Also,\ please\ don't\ forget\ that\ 'info\ script'\ will\ yield\ the\ name\ of\ a\ source\ file\ only\ while\ it's\ being\ read\ in\ -\ not\ if,\ for\ example,\ a\ procedure\ provided\ by\ that\ source\ file\ is\ called\ later\ (maybe\ by\ a\ button\ you\ clicked).\n\n----\n**Tracing\ in\ Parser\ Tools**\n\[jbr\]\ Hi\ again\ all\ -\ I've\ continued\ to\ play\ with\ the\ very\ nice\ \[Parser\ Tools\]\ packages\ in\ the\ new\ tcllib\ (1.13).\ \ There\ seems\ to\ be\ a\ TRACE\ facility\ that\ would\ be\ very\ useful\ in\ finding\ out\ what\ is\ going\ on\ as\ the\ data\ is\ parsed,\ but\ I\ cannot\ see\ how\ to\ enable\ this\ feature?\n\nThanks\n\n\[AK\]\ I\ am\ sorry,\ the\ TRACE\ facility\ is\ not\ exposed\ to\ user\ control.\ You\ will\ have\ to\ go\ into\ the\ various\ methods\ and\ uncomment\ the\ calls\ to\ TRACE\ to\ activate\ it.\n\n-----\n**Accessing\ Methods\ of\ TclOO**\nIs\ it\ possible\ to\ access\ methods\ of\ a\ TclOO\ object\ without\ using\ \[self\]\ or\ \[my\]?\ -->\ \[Forwarding\ local\ namespace\ proc\ calls\ to\ instance\ methods\ in\ TclOO\]\n\nI've\ mostly\ answered\ my\ own\ question\ but\ would\ like\ some\ feedback\ from\ those\ in\ the\ know.\n\nThanks\ -\ \[jbr\]\n\n\[DKF\]:\ Basically,\ no\ (depending\ on\ what\ you\ mean\ by\ ?access?\ of\ course).\ Methods\ aren't\ commands\;\ at\ the\ C\ level,\ they're\ implemented\ by\ a\ different\ callback\ that\ takes\ an\ extra\ argument\ relative\ to\ commands\ (the\ extra\ value\ describes\ the\ context\ in\ which\ the\ method\ was\ invoked,\ which\ typically\ matters\ ''a\ lot'')\ and\ doing\ it\ that\ way\ allowed\ much\ of\ the\ guts\ of\ \[TclOO\]\ to\ be\ implemented\ simply,\ but\ it\ does\ mean\ that\ methods\ cannot\ be\ executed\ without\ knowing\ what\ object\ they're\ being\ invoked\ upon.\ That's\ in\ turn\ handled\ either\ through\ the\ identity\ of\ the\ public\ object\ command\ (what\ you\ normally\ think\ of\ as\ the\ ?name?\ of\ the\ object)\ or\ the\ identity\ of\ the\ \[my%|%private\ object\ command\],\ which\ is\ typically\ known\ through\ which\ namespace\ is\ declaring\ it.\n\nIf\ you\ want\ to\ forward\ commands\ in\ the\ object\ namespace\ to\ the\ object\ method\ with\ the\ same\ name,\ use\ \[namespace\ unknown\],\ perhaps\ like\ this\ (untested!)\ example\ that\ also\ uses\ \[tailcall\]\ and\ \[my\].\ It\ ''needs''\ to\ be\ invoked\ in\ the\ relevant\ namespace\;\ a\ good\ time\ to\ set\ it\ up\ is\ in\ the\ constructor.\n======\nnamespace\ unknown\ \{tailcall\ my\}\n======\n----\n**regedit\ on\ Windows**\n\[Beware\]\ 18/2/2011\nCalling\n\n======\nexec\ regedit\ /e\ temp.txt\ \"HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Internet\ Explorer\\\\PageSetup\"\n======\n\nwrites\ a\ text\ file\ (readable\ in\ notepad)\ listing\ the\ various\ key/value\ pairs.\n\ndoing\n\n======\nset\ fh\ \[open\ temp.txt\]\nset\ data\ \[read\ \$fh\]\nclose\ \$fh\ntk_messageBox\ -message\ \$data\n======\n\ngives\ me\ three\ random\ characters.\ \ Why\ can't\ I\ read\ the\ data\ in\ the\ file\ properly?\ \ I'm\ guessing\ this\ is\ an\ encoding\ issue\n\n(about\ 2\ minutes\ later)\n\nSorted.\ \ fconfiguring\ to\ -encoding\ unicode\ works...\n\n----\n**Writing\ code\ for\ trails**\n\n\[fs)\ 2011-02-18\ My\ question\ is\ here:\n\n\[Coding\ trails\ for\ hyperlinks\]\ \n\n----\n**Exposing\ TclOO\ variable\ names**\n\[jbr\]\ 2011-02-11\n\nHow\ do\ I\ expose\ the\ state\ of\ TclOO\ objects\ for\ use\ with\ Tk\ and\ variable\ traces?\n\nI've\ been\ using\ TclOO\ for\ a\ few\ months\ now\ and\ have\ come\ to\ like\ it,\ but\ now\ my\ application\ state,\ which\ in\ the\ past\ might\ have\ been\ kept\ in\ a\ global\ array\ or\ set\ of\ global\ variables,\ is\ inside\ one\ of\ more\ objects.\ \ Does\ anyone\ have\ some\ good\ ideas\ about\ how\ to\ get\ the\ value\ in\ an\ object\ onto\ a\ Tk\ widget?\ \ Is\ is\ acceptable\ to\ add\ traces\ to\ variables\ in\ an\ object's\ namespace?\ \ And\ more\ generally\ \"Now\ that\ we\ have\ objects,\ How\ do\ I\ tie\ my\ application\ together?\"\n\nTo\ date\ I've\ written\ methods\ to\ had\ back\ the\ full\ namespace\ path\ to\ specific\ value\ I\ need\ to\ display,\ but\ this\ is\ tedious.\n\nThanks\ -\ John\n\n\[DKF\]:\ TclOO's\ instance\ variables\ actually\ have\ names\ in\ the\ \"global\ naming\"\ hierarchy,\ and\ the\ '''varname'''\ method\ (defined\ by\ \[oo::object\])\ can\ report\ them\ for\ you\;\ it's\ a\ hidden\ method\ by\ default,\ so\ access\ it\ with\ \[my\]\ from\ inside\ your\ methods:\n\n======\n\ \ oo::class\ create\ FooBarGrillLabelExample\ \{\n\ \ \ \ \ \ variable\ x\n\ \ \ \ \ \ constructor\ \{w\}\ \{\n\ \ \ \ \ \ \ \ \ \ label\ \$w\ -textvariable\ \[my\ varname\ x\]\n\ \ \ \ \ \ \}\n\ \ \ \ \ \ method\ setLabel\ \{txt\}\ \{\n\ \ \ \ \ \ \ \ \ \ set\ x\ \$txt\n\ \ \ \ \ \ \}\n\ \ \}\n======\nThis\ method\ also\ works\ great\ for\ integration\ with\ all\ those\ places\ where\ you\ need\ to\ pass\ a\ variable\ name\ into\ Tcl,\ notably\ \[trace\]\ and\ \[vwait\].\n\n\[jbr\]\ -\ Yes\ -\ This\ is\ the\ part\ that\ I\ find\ tedious.\ \ Everything\ needs\ to\ be\ put\ in\ some\ kind\ of\ wrapper.\ \ I've\ solved\ this\ for\ my\ case\ by\ exporting\ varname.\n\n-----\n**Accessing\ the\ help\ pages\ without\ changing\ the\ default\ directory**\n\n\[Didier\]\ (2011-02-09)\ My\ question\ is\ here:\ \[Accessing\ the\ help\ pages\ without\ changing\ the\ default\ directory\]\n\n-----\n**List\ of\ categories\ on\ this\ wiki**\n\n\[Didier\](2011-02-09)\ My\ new\ question\ is\ here:\ \[Where\ to\ find\ the\ list\ of\ categories\ on\ this\ wiki?\]\n\n\[DKF\]:\ The\ place\ to\ go\ is\ the\ \[Category\ Category%|%category\ of\ categories\]\ and\ click\ on\ the\ link\ at\ the\ very\ top\ of\ the\ page\ to\ take\ yourself\ to\ the\ list\ of\ pages\ that\ reference\ the\ metacategory.\ Or\ go\ \[http://wiki.tcl.tk/_/ref?N=2187%|%directly\ there\],\ though\ that's\ less\ mnemonic\ IMO.\n\n------\n**Escapes\ for\ individual\ new\ lines\ in\ a\ CSV\ file**\n\n\[beware\]Quick\ silly\ question\ (I\ think)...\ \ on\ windows,\ \"\\n\"\ matches\ both\ types\ of\ newline.\ \ What\ are\ the\ escapes\ for\ the\ individual\ ones?\ \ I\ have\ a\ CSV\ file\ with\ embedded\ soft\ newlines\ that\ I\ want\ to\ replace.\n\n\[GJS\]\ (2011-02-09)\ I\ believe\ you\ are\ looking\ for\ carriage\ return\ \"\\r\"\ and\ line\ feed\ \"\\f\"\n\n\[Duoas\]\ (2011-02-21)\ The\ \"\\f\"\ escape\ sequence\ is\ for\ Form\ Feed,\ which\ is\ not\ the\ same\ as\ New\ Line.\n\nYou'll\ want\ to\ fconfigure\ your\ stream\ to\ binary\ mode\ and\ look\ for\ \"\\r\\n\",\ which\ is\ CR-LF.\ The\ non-binary\ mode\ is\ for\ use\ on\ non-POSIX\ systems\ to\ turn\ the\ single\ \"\\n\"\ (LF)\ character\ into\ the\ platform-appropriate\ character\ sequence.\ On\ Windows\ that's\ an\ \"\\r\\n\".\n\n-----\n**Running\ two\ copies\ of\ the\ same\ program\ simultaneously**\n\n\[Didier\](Saturday\ February\ 5th\ 2011)\ See:\ \[Opening\ a\ window\ that\ duplicates\ the\ program\ we're\ on\]\ \n\n-----\n**Sizing\ windows**\n\n\[Didier\]\](Saturday\ February\ 5th\ 2011)\ I\ have\ another\ question\ here:\ \[Questions\ related\ to\ windows\].\ Thanks\ again!\n\n----\n**Help\ with\ notebooks**\n'''\[hshang\]\ -\ 2011-03-17\ 12:04:48''':\ \[ttk:notebook\ help\]\n\n<<categories>>\ Discussion\ |\ Development} CALL {my revision {Ask, and it shall be given # 9}} CALL {::oo::Obj644970 process revision/Ask%2C+and+it+shall+be+given+%23+9} CALL {::oo::Obj644968 process}

-errorcode

NONE

-errorinfo

Unknow state transition: LINE -> END
    while executing
"error $msg"
    (class "::Wiki" method "render_wikit" line 6)
    invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
    (class "::Wiki" method "render" line 8)
    invoked from within
"my render $name $C"
    (class "::Wiki" method "revision" line 31)
    invoked from within
"my revision $page"
    (class "::Wiki" method "process" line 56)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4