Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/An+i15d+date+chooser?V=54
QUERY_STRINGV=54
CONTENT_TYPE
DOCUMENT_URI/revision/An+i15d+date+chooser
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.70.131.189
REMOTE_PORT23288
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR3.141.24.134
HTTP_CF_RAY87f003002c968114-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_CF_CONNECTING_IP3.141.24.134
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 {An i15d date chooser} \[WikiDbImage\ i15dcal.jpg\]\n\n**\ Summary\ **\n\n\[Richard\ Suchenwirth\]\ 2001-06-25:\ \ \[i15d\]:\ internationalized.\ This\ is\ the\nsecond\ attempt\ at\ a\ calendar\ widget\ (for\ the\ first\ see\ \[A\ little\ date\nchooser\]).\ Instead\ of\ fiddling\ packer\ geometry,\ it\ now\ has\ all\ controls\ on\ a\ncanvas\;\ displays\ days\ in\ neighboring\ months\ (grayed\ out,\ not\ selectable)\;\ you\ncan\ configure\ the\ weekday\ sequence\ to\ start\ with\ Sunday\ or\ Monday\;\ but\ best\ of\nall,\ allows\ on-the-fly\ reconfiguration\ of\ the\ language\ used\ for\ month\ and\nweekday\ names.\ Language\ data\ is\ provided\ for\ English,\ German,\ French,\ Greek,\nItalian,\ Russian,\ Swedish,\ Hebrew\ and\ Chinese\;\ feel\ free\ to\ add\ more.\ \ Enjoy!\n\n**\ See\ Also\ **\n\n\ \ \ \[i18n\ -\ writing\ for\ the\ world\]:\ \ \ \n\n**\ Description\ **\n\n----\n\nSomeone\ added\ Japanese\ (ja).\ \[MS\]\ did\ Spanish.\ \ \[JCW\]\ did\ Dutch\ (nl).\ \[GP-L\]\nadded\ some\ missing\ accents\ in\ French\ (fr).\ \ \[Peter\ Lewerin\]\ added\ Swedish\ (sv).\n\[ECS\]\ added\ Portuguese\ (pt).\ \[NB\]\ added\ Greek\ (gr).\ \ \[WJP\]\ added\ Plains\ Cree\n(crk),\ Nak'albun\ (Stuart\ Lake)\ dialect\ Carrier\ (crx-nak,\ and\ Lheidli\ dialect\nCarrier\ (crx-lhe).\ \ I'm\ afraid\ these\ disrupt\ the\ alignment\ of\ the\ radiobuttons,\nbut\ the\ dialects\ are\ different\ and\ in\ any\ case\ two-letter\ language\ codes\ are\npasse.\n\n----\n\n\[LV\]\ and\ \[RS\]\ talked\ (was\ it\ chat\ or\ email)\ about\ the\ use\ of\ embedded\ data\ vs.\nthe\ use\ of\ the\ \[tcl\]\ \[msgcat\]\ catalog\ functions.\ \ The\ pro\ of\ this\ is\ that\ one\ncould,\ with\ proper\ coding,\ add\ new\ languages\ without\ change\ to\ the\ software,\nand\ could\ get\ some\ reuse\ out\ of\ the\ data.\n\n\[RS\]\ pointed\ out\ the\ cons\ -\ he\ didn't\ want\ to\ use\ the\ msgcat\ -\ he\ wanted\ an\nall-in-one\ tcl\ script\ rather\ than\ a\ series\ of\ files.\ Perhaps\ both\ could\ be\naccomodated\ by\ someone\ providing\ some\ tcl\ scripts\ that\ take\ embedded\ tcl\ data\nand\ writing\ it\ out\ to\ the\ msg\ cat\;\ that\ way,\ the\ app\ could\ create/update\ one's\nmsgcat\ if\ new\ info\ were\ available....\n\n\[VL\]\ \ 2003-06-07:\ \ Perhaps\ you\ are\ looking\ for\ msgcatx?\ Extracts\nmsgcat-catalogues\ with\ some\ comments\ on\ where\ in\ the\ code\ and\ also\ the\ sort\ of\nobject\ the\ string\ is\ contained\ in.\ Part\ of\ my\ Mimers\ brunn\ project\n\[http://mimersbrunn.sf.net\],\ not\ done\ much\ work\ since\ last\ spring,\ but\ it\ is\ndefinitely\ usable\ and\ I'll\ be\ working\ on\ a\ UI\ to\ it\ when\ I\ get\ some\ spare\ntime.''\n\n\[CLN\]:\ \ It's\ not\ clear\ to\ me\ why\ msgcat\ and\ \"all-in-one\ tcl\ script\"\ are\nincompatible?\ \ A\ message\ catalog\ is\ just\ a\ Tcl\ script\ with\ one\ or\ more\ mcset\ or\nmcmset\ commands.\ \ Can't\ we\ have:\n\n======n\nmcset\ en\ Mon\ Monday\nmcset\ it\ Mon\ Lunedi\n...\n======\n\nor\n\n======\nmcmset\ en\ \{\n\ \ \ \ Mon\ Monday\n\ \ \ \ Tue\ Tuesday\n\ \ \ \ ...\n\}\nmcmset\ it\ \{\n\ \ \ \ Mon\ Lunedi\n\ \ \ \ Tue\ Martedi\n\ \ \ \ ...\n\}\n...\n======\n\nat\ the\ top\ of\ the\ script?\n\n\[RS\]:\ \ In\ my\ mind,\ this\ adds\ complexity\ without\ necessity.\ The\ day\ and\ month\nnames\ are\ \[list\]s\ so\ one\ can\ index\ into\ them.\ Making\ them\ scalar\ as\ proposed\nwould\ not\ make\ the\ code\ simpler...\n\n\[VL\]\ 2003-06-07:\ \ For\ small\ scripts\ this\ would\ be\ feasible,\ but\ it\ sort\ of\ntakes\ the\ point\ out\ of\ localization,\ the\ idea\ is\ to\ make\ it\ easy\ to\ translate\nwithout\ having\ to\ go\ into\ the\ code\ and\ do\ changes.\n\n\[LV\]:\ \ For\ that\ matter\ -\ perhaps\ some\ kind\ of\ conditional\ command\ -\ if\ this\ncatalog\ entry\ does\ not\ exist,\ then\ create\ it.\ \ However,\ the\ user\ would\ have\ to\nhave\ write\ permission\ in\ the\ catalog\ area\ -\ something\ that\ many\ of\ us\ would\ be\nunlikely\ to\ want\ to\ provide.\n\n\[VL\]\ 2003-06-07:\ \ The\ default\ if\ a\ catalogue\ is\ missing\ is\ to\ use\ the\ initial\nmessage,\ or\ '''en'''\ if\ it\ is\ provided.\ For\ a\ good\ idea\ of\ how\ to\ work\ with\nlocalizing\ your\ applications\ do\ take\ a\ look\ at\ the\n\[http://www.iro.umontreal.ca/contrib/po/HTML/%|%Free\ Translation\ Project\]\n\n\[SH\]\ 2003-07-08:\ \ Fixed\ bug\ in\ which\ days\ for\ 'pt'\ display\ instead\ of\ english,\nand\ 'pt'\ missing.\n\n----\n\nWhen\ I\ resize\ this\ widget,\ the\ numbers\ and\ words\ don't\ grow\ -\ is\ there\ a\ way\ to\ncode\ Tk\ widgets\ so\ that\ one\ can\ change\ the\ size\ (so\ that\ old\ people\ can\ read\nthe\ words...).\n\n======\npackage\ require\ msgcat\npackage\ require\ Tk\nnamespace\ eval\ date\ \{\n\ \ \ \ proc\ chooser\ \{w\ args\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ variable\ defaults\n\ \ \ \ \ \ \ \ array\ set\ \$w\ \[array\ get\ defaults\]\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \n\ \ \ \ \ \ \ \ set\ now\ \[clock\ scan\ now\]\n\ \ \ \ \ \ \ \ set\ a(year)\ \[clock\ format\ \$now\ -format\ \"%Y\"\]\n\ \ \ \ \ \ \ \ scan\ \[clock\ format\ \$now\ -format\ \"%m\"\]\ %d\ a(month)\n\ \ \ \ \ \ \ \ scan\ \[clock\ format\ \$now\ -format\ \"%d\"\]\ %d\ a(day)\n\ \n\ \ \ \ \ \ \ \ array\ set\ a\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ -font\ \{Helvetica\ 9\}\ -titlefont\ \{Helvetica\ 12\}\ -bg\ white\n\ \ \ \ \ \ \ \ \ \ \ \ -highlight\ orange\ -mon\ 1\ -langauge\ en\ -textvariable\ \{\}\n\ \ \ \ \ \ \ \ \ \ \ \ -command\ \{\}\ -clockformat\ \"%m/%d/%Y\"\ -showpast\ 1\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ #\ The\ -mon\ switch\ gives\ the\ position\ of\ Monday\ (1\ or\ 0)\n\ \ \ \ \ \ \ \ array\ set\ a\ \$args\n\ \ \ \ \ \ \ \ set\ a(canvas)\ \[canvas\ \$w\ -bg\ \$a(-bg)\ -width\ 200\ -height\ 180\]\n\ \ \ \ \ \ \ \ \$w\ bind\ day\ <1>\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ item\ \[%W\ find\ withtag\ current\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ date::%W(day)\ \[%W\ itemcget\ \$item\ -text\]\n\ \ \ \ \ \ \ \ \ \ \ \ date::display\ %W\n\ \ \ \ \ \ \ \ \ \ \ \ date::HandleCallback\ %W\n\ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ if\ \{\ \$a(-textvariable)\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ tmp\ \[set\ \$a(-textvariable)\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$tmp\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ date\ \[clock\ scan\ \$tmp\ -format\ \$a(-clockformat)\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ a(thisday)\ \ \ \[clock\ format\ \$date\ -format\ %d\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ a(thismonth)\ \[clock\ format\ \$date\ -format\ %m\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ a(thisyear)\ \ \[clock\ format\ \$date\ -format\ %Y\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ cbutton\ \$w\ 60\ \ 10\ <<\ \{date::adjust\ %W\ \ 0\ -1\}\n\ \ \ \ \ \ \ \ cbutton\ \$w\ 80\ \ 10\ <\ \ \{date::adjust\ %W\ -1\ \ 0\}\n\ \ \ \ \ \ \ \ cbutton\ \$w\ 120\ 10\ >\ \ \{date::adjust\ %W\ \ 1\ \ 0\}\n\ \ \ \ \ \ \ \ cbutton\ \$w\ 140\ 10\ >>\ \{date::adjust\ %W\ \ 0\ \ 1\}\n\ \ \ \ \ \ \ \ display\ \$w\n\ \ \ \ \ \ \ \ set\ w\n\ \ \ \ \}\n\n\ \ \ \ proc\ adjust\ \{w\ dmonth\ dyear\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \n\ \ \ \ \ \ \ \ incr\ a(year)\ \ \$dyear\n\ \ \ \ \ \ \ \ incr\ a(month)\ \$dmonth\n\ \ \ \ \ \ \ \ if\ \{\$a(month)>12\}\ \{set\ a(month)\ 1\;\ incr\ a(year)\}\n\ \ \ \ \ \ \ \ if\ \{\$a(month)<1\}\ \ \{set\ a(month)\ 12\;\ incr\ a(year)\ -1\}\n\ \ \ \ \ \ \ \ set\ maxday\ \[numberofdays\ \$a(month)\ \$a(year)\]\n\ \ \ \ \ \ \ \ if\ \{\$maxday\ <\ \$a(day)\}\ \{set\ a(day)\ \$maxday\}\n\ \ \ \ \ \ \ \ display\ \$w\n\ \ \ \ \}\n\n\ \ \ \ proc\ display\ \{w\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \n\ \ \ \ \ \ \ \ set\ c\ \$a(canvas)\n\ \ \ \ \ \ \ \ foreach\ tag\ \{title\ otherday\ day\}\ \{\$c\ delete\ \$tag\}\n\ \ \ \ \ \ \ \ set\ x0\ 20\;\ set\ x\ \$x0\;\ set\ y\ 50\n\ \ \ \ \ \ \ \ set\ dx\ 25\;\ set\ dy\ 20\n\ \ \ \ \ \ \ \ set\ xmax\ \[expr\ \{\$x0+\$dx*6\}\]\n\ \ \ \ \ \ \ \ set\ a(date)\ \[clock\ scan\ \$a(month)/\$a(day)/\$a(year)\]\n\ \ \ \ \ \ \ \ set\ title\ \[formatMY\ \$w\ \[monthname\ \$w\ \$a(month)\]\ \$a(year)\]\n\ \ \ \ \ \ \ \ \$c\ create\ text\ \[expr\ (\$xmax+\$dx)/2\]\ 30\ -text\ \$title\ -fill\ blue\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -font\ \$a(-titlefont)\ -tag\ title\n\ \ \ \ \ \ \ \ set\ weekdays\ \$a(weekdays,\$a(-language))\n\ \ \ \ \ \ \ \ if\ !\$a(-mon)\ \{lcycle\ weekdays\}\n\ \ \ \ \ \ \ \ foreach\ i\ \$weekdays\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$c\ create\ text\ \$x\ \$y\ -text\ \$i\ -fill\ blue\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -font\ \$a(-font)\ -tag\ title\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ x\ \$dx\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ set\ first\ \$a(month)/1/\$a(year)\n\ \ \ \ \ \ \ \ set\ weekday\ \[clock\ format\ \[clock\ scan\ \$first\]\ -format\ %w\]\n\ \ \ \ \ \ \ \ if\ !\$a(-mon)\ \{set\ weekday\ \[expr\ \{(\$weekday+6)%7\}\]\}\n\ \ \ \ \ \ \ \ set\ x\ \[expr\ \{\$x0+\$weekday*\$dx\}\]\n\ \ \ \ \ \ \ \ set\ x1\ \$x\;\ set\ offset\ 0\n\ \ \ \ \ \ \ \ incr\ y\ \$dy\n\ \ \ \ \ \ \ \ while\ \{\$weekday\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ t\ \[clock\ scan\ \"\$first\ \[incr\ offset\]\ days\ ago\"\]\n\ \ \ \ \ \ \ \ \ \ \ \ scan\ \[clock\ format\ \$t\ -format\ \"%d\"\]\ %d\ day\n\ \ \ \ \ \ \ \ \ \ \ \ \$c\ create\ text\ \[incr\ x1\ -\$dx\]\ \$y\ -text\ \$day\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -fill\ grey\ -font\ \$a(-font)\ -tag\ otherday\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ weekday\ -1\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ set\ dmax\ \[numberofdays\ \$a(month)\ \$a(year)\]\n\ \ \ \ \ \ \ \ for\ \{set\ d\ 1\}\ \{\$d<=\$dmax\}\ \{incr\ d\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{(\$a(-showpast)\ ==\ 0)\ &&\ (\$d<\$a(thisday))\ &&\ (\$a(month)\ <=\ \$a(thismonth))\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ &&\ (\$a(year)\ <=\ \$a(thisyear))\ \}\ \{\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ id\ \[\$c\ create\ text\ \$x\ \$y\ -text\ \$d\ -fill\ grey\ -tag\ otherday\ -font\ \$a(-font)\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ id\ \[\$c\ create\ text\ \$x\ \$y\ -text\ \$d\ -tag\ day\ -font\ \$a(-font)\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$d==\$a(day)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ eval\ \$c\ create\ rect\ \[\$c\ bbox\ \$id\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -fill\ \$a(-highlight)\ -outline\ \$a(-highlight)\ -tag\ day\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \$c\ raise\ \$id\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[incr\ x\ \$dx\]>\$xmax\}\ \{set\ x\ \$x0\;\ incr\ y\ \$dy\}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ if\ \{\$x\ !=\ \$x0\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ d\ 1\}\ \{\$x<=\$xmax\}\ \{incr\ d\;\ incr\ x\ \$dx\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$c\ create\ text\ \$x\ \$y\ -text\ \$d\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -fill\ grey\ -font\ \$a(-font)\ -tag\ otherday\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ if\ \{\ \$a(-textvariable)\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ #\ puts\ \"\[info\ level\ 0\]:\ \$a(-clockformat)\"\n\ \ \ \ \ \ \ \ \ \ \ \ set\ \$a(-textvariable)\ \[clock\ format\ \$a(date)\ -format\ \$a(-clockformat)\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \n\ \ \ \ proc\ HandleCallback\ \{w\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \ \ \ \ \ \ \ if\ \{\ \$a(-command)\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ uplevel\ \\#0\ \$a(-command)\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \n\ \ \ \ proc\ formatMY\ \{w\ month\ year\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \n\ \ \ \ \ \ \ \ if\ !\[info\ exists\ a(format,\$a(-language))\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ format\ \"%m\ %y\"\ \;#\ default\n\ \ \ \ \ \ \ \ \}\ else\ \{set\ format\ \$a(format,\$a(-language))\}\n\ \ \ \ \ \ \ \ foreach\ \{from\ to\}\ \[list\ %m\ \$month\ %y\ \$year\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ regsub\ \$from\ \$format\ \$to\ format\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ subst\ \$format\n\ \ \ \ \}\n\n\ \ \ \ proc\ monthname\ \{w\ month\ \{language\ default\}\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \n\ \ \ \ \ \ \ \ if\ \{\$language==\"default\"\}\ \{set\ language\ \$a(-language)\}\n\ \ \ \ \ \ \ \ if\ \{\[info\ exists\ a(mn,\$language)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ res\ \[lindex\ \$a(mn,\$language)\ \$month\]\n\ \ \ \ \ \ \ \ \}\ else\ \{set\ res\ \$month\}\n\ \ \ \ \}\n\ \n\ \ \ \ variable\ defaults\n\n\ \ \ \ array\ set\ defaults\ \{\n\ \ \ \ \ \ \ \ -language\ en\n\ \ \ \ \ \ \ \ \ mn,crk\ \{\n\ \ \ \ \ \ \ \ \ .\ Kis\\u01E3p\\u012Bsim\ Mikisiwip\\u012Bsim\ Niskip\\u012Bsim\ Ay\\u012Bkip\\u012Bsim\n\ \ \ \ \ \ \ \ \ S\\u0101kipak\\u0101wip\\u012Bsim\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ P\\u0101sk\\u0101wihowip\\u012Bsim\ Paskowip\\u012Bsim\ Ohpahowip\\u012Bsim\ \ \ \ \ \n\ \ \ \ \ \ \ \ \ N\\u014Dcihitowip\\u012Bsim\ Pin\\u0101skowip\\u012Bsim\ Ihkopiwip\\u012Bsim\n\ \ \ \ \ \ \ \ \ Paw\\u0101cakinas\\u012Bsip\\u012Bsim\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,crk\ \{P\\u01E3\ N\\u01E3s\ Nis\ N\\u01E3\ Niy\ Nik\ Ay\}\n\ \n\ \ \ \ \ \ \ \ mn,crx-nak\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ .\ \{Sacho\ Ooza'\}\ \{Chuzsul\ Ooza'\}\ \{Chuzcho\ Ooza'\}\ \{Shin\ Ooza'\}\ \{Dugoos\ Ooza'\}\ \{Dang\ Ooza'\}\\\n\ \ \ \ \ \ \ \ \ \ \ \{Talo\ Ooza'\}\ \{Gesul\ Ooza'\}\ \{Bit\ Ooza'\}\ \{Lhoh\ Ooza'\}\ \{Banghan\ Nuts'ukih\}\ \{Sacho\ Din'ai\}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,crx-nak\ \{Ji\ Jh\ WN\ WT\ WD\ Ts\ Sa\}\n\ \n\ \ \ \ \ \ \ \ mn,crx-lhe\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ .\ \{'Elhdzichonun\}\ \{Yussulnun\}\ \{Datsannadulhnun\}\ \{Dulats'eknun\}\ \{Dugoosnun\}\ \{Daingnun\}\\\n\ \ \ \ \ \ \ \ \ \ \ \ \{Gesnun\}\ \{Nadlehcho\}\ \{Nadlehyaz\}\ \{Lhewhnandelnun\}\ \{Benats'ukuihnun\}\ \{'Elhdziyaznun\}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,crx-lhe\ \{Ji\ Jh\ WN\ WT\ WD\ Ts\ Sa\}\n\ \n\ \ \ \ \ \ \ \ mn,de\ \{\n\ \ \ \ \ \ \ \ .\ Januar\ Februar\ März\ April\ Mai\ Juni\ Juli\ August\n\ \ \ \ \ \ \ \ September\ Oktober\ November\ Dezember\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,de\ \{So\ Mo\ Di\ Mi\ Do\ Fr\ Sa\}\n\ \n\ \ \ \ \ \ \ \ mn,en\ \{\n\ \ \ \ \ \ \ \ .\ January\ February\ March\ April\ May\ June\ July\ August\n\ \ \ \ \ \ \ \ September\ October\ November\ December\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,en\ \{Sun\ Mon\ Tue\ Wed\ Thu\ Fri\ Sat\}\n\ \n\ \ \ \ \ \ \ \ mn,es\ \{\n\ \ \ \ \ \ \ \ .\ Enero\ Febrero\ Marzo\ Abril\ Mayo\ Junio\ Julio\ Agosto\n\ \ \ \ \ \ \ \ Septiembre\ Octubre\ Noviembre\ Diciembre\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,es\ \{Do\ Lu\ Ma\ Mi\ Ju\ Vi\ Sa\}\n\ \n\ \ \ \ \ \ \ \ mn,fr\ \{\n\ \ \ \ \ \ \ \ .\ Janvier\ Février\ Mars\ Avril\ Mai\ Juin\ Juillet\ Août\n\ \ \ \ \ \ \ \ Septembre\ Octobre\ Novembre\ Décembre\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,fr\ \{Di\ Lu\ Ma\ Me\ Je\ Ve\ Sa\}\n\ \n\ \ \ \ \ \ \ \ mn,gr\ \{\n\ \ \ \ \ \ \ \ .\ ÎýýανοÏýýάÏýýιοÏýý\ ΦεβÏýýοÏýýάÏýýιοÏýý\ ÎýýάÏýýÏýýιοÏýý\ ÎýýÏýýÏýýίλιοÏýý\ ÎýýαÎýýοÏýý\ ÎýýοÏýýνιοÏýý\ ÎýýοÏýýλιοÏýý\ ÎýýÏýýγοÏýýÏýýÏýýοÏýý\n\ \ \ \ \ \ \ \ ΣεÏýýÏýýÎýýμβÏýýιοÏýý\ ÎýýκÏýýÏýýμβÏýýιοÏýý\ ÎýýοÎýýμβÏýýιοÏýý\ ÎýýεκÎýýμβÏýýιοÏýý\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,gr\ \{ÎýýÏýýÏýý\ ÎýýεÏýý\ TÏýýη\ ΤεÏýý\ Î\ εμ\ Î\ αÏýý\ Σαβ\}\n\ \n\ \ \ \ \ \ \ \ mn,he\ \{\n\ \ \ \ \ \ \ \ \ .\ ×ýý×\ ×ýý×ýýר\ פ×ýýר×ýý×ýýר\ ×ýýרץ\ ×ýýפר×ýý×ýý\ ×ýý×ýý×ýý\ ×ýý×ýý×\ ×ýý\ ×ýý×ýý×ýý×ýý\ ×ýý×ýý×ýý×ýýס×ýý\ ספ×ýý×ýý×ýýר\ ×ýý×ýýק×ýý×ýý×ýýר\ ×\ ×ýý×ýý×ýý×ýýר\ ×ýýצ×ýý×ýýר\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,he\ \{ר×ýýש×ýý×ýý\ ש×\ ×ýý\ ש×ýý×ýýש×ýý\ ר×ýý×ýýע×ýý\ ×ýý×ýý×ýýש×ýý\ ש×ýýש×ýý\ ש×ýýת\}\n\ \ \ \ \ \ \ \ mn,it\ \{\n\ \ \ \ \ \ \ \ .\ Gennaio\ Febraio\ Marte\ Aprile\ Maggio\ Giugno\ Luglio\ Agosto\n\ \ \ \ \ \ \ \ Settembre\ Ottobre\ Novembre\ Dicembre\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,it\ \{Do\ Lu\ Ma\ Me\ Gi\ Ve\ Sa\}\n\ \n\ \ \ \ \ \ \ \ format,ja\ \{%y\\u5e74\ %m\\u6708\}\n\ \ \ \ \ \ \ \ weekdays,ja\ \{\\u65e5\ \\u6708\ \\u706b\ \\u6c34\ \\u6728\ \\u91d1\ \\u571f\}\n\ \n\ \ \ \ \ \ \ \ mn,nl\ \{\n\ \ \ \ \ \ \ \ .\ januari\ februari\ maart\ april\ mei\ juni\ juli\ augustus\n\ \ \ \ \ \ \ \ september\ oktober\ november\ december\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,nl\ \{Zo\ Ma\ Di\ Wo\ Do\ Vr\ Za\}\n\ \n\ \ \ \ \ \ \ \ mn,ru\ \{\n\ \ \ \ \ \ \ \ .\ \\u042F\\u043D\\u0432\\u0430\\u0440\\u044C\n\ \ \ \ \ \ \ \ \\u0424\\u0435\\u0432\\u0440\\u0430\\u043B\\u044C\ \\u041C\\u0430\\u0440\\u0442\n\ \ \ \ \ \ \ \ \\u0410\\u043F\\u0440\\u0435\\u043B\\u044C\ \\u041C\\u0430\\u0439\n\ \ \ \ \ \ \ \ \\u0418\\u044E\\u043D\\u044C\ \\u0418\\u044E\\u043B\\u044C\n\ \ \ \ \ \ \ \ \\u0410\\u0432\\u0433\\u0443\\u0441\\u0442\n\ \ \ \ \ \ \ \ \\u0421\\u0435\\u043D\\u0442\\u044F\\u0431\\u0440\\u044C\n\ \ \ \ \ \ \ \ \\u041E\\u043A\\u0442\\u044F\\u0431\\u0440\\u044C\ \\u041D\\u043E\\u044F\\u0431\\u0440\\u044C\n\ \ \ \ \ \ \ \ \\u0414\\u0435\\u043A\\u0430\\u0431\\u0440\\u044C\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,ru\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \\u432\\u43e\\u441\ \\u43f\\u43e\\u43d\ \\u432\\u442\\u43e\ \\u441\\u440\\u435\n\ \ \ \ \ \ \ \ \ \ \ \ \\u447\\u435\\u442\ \\u43f\\u44f\\u442\ \\u441\\u443\\u431\n\ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ mn,sv\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ .\ januari\ februari\ mars\ april\ maj\ juni\ juli\ augusti\n\ \ \ \ \ \ \ \ \ \ \ \ september\ oktober\ november\ december\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,sv\ \{s\\u00F6n\ m\\u00E5n\ tis\ ons\ tor\ fre\ l\\u00F6r\}\n\ \n\ \ \ \ \ \ \ \ mn,pt\ \{\n\ \ \ \ \ \ \ \ .\ Janeiro\ Fevereiro\ Mar\\u00E7o\ Abril\ Maio\ Junho\n\ \ \ \ \ \ \ \ Julho\ Agosto\ Setembro\ Outubro\ Novembro\ Dezembro\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,pt\ \{Dom\ Seg\ Ter\ Qua\ Qui\ Sex\ Sab\}\n\ \n\ \ \ \ \ \ \ \ format,zh\ \{%y\\u5e74\ %m\\u6708\}\n\ \ \ \ \ \ \ \ mn,zh\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ .\ \\u4e00\ \\u4e8c\ \\u4e09\ \\u56db\ \\u4e94\ \\u516d\ \\u4e03\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \\u516b\ \\u4e5d\ \\u5341\ \\u5341\\u4e00\ \\u5341\\u4e8c\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,zh\ \{\\u65e5\ \\u4e00\ \\u4e8c\ \\u4e09\ \\u56db\ \\u4e94\ \\u516d\}\n\ \ \ \ \ \ \ \ mn,fi\ \{\n\ \ \ \ \ \ \ \ \ \ .\ Tammikuu\ Helmikuu\ Maaliskuu\ Huhtikuu\ Toukokuu\ Kesäkuu\n\ \ \ \ \ \ \ \ \ \ Heinäkuu\ Elokuu\ Syyskuu\ Lokakuu\ Marraskuu\ Joulukuu\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,fi\ \{Ma\ Ti\ Ke\ To\ Pe\ La\ Su\}\n\ \ \ \ \ \ \ \ mn,tr\ \{\n\ \ \ \ \ \ \ \ \ \ \ .\ ocak\ \\u015fubat\ mart\ nisan\ may\\u0131s\ haziran\ temmuz\ a\\u011fustos\ eyl\\u00FCl\ ekim\ kas\\u0131m\ aral\\u0131k\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,tr\ \{pa'tesi\ sa\ \\u00e7a\ pe\ cu\ cu'tesi\ pa\}\n\ \ \ \ \}\n\n\ \ \ \ proc\ numberofdays\ \{month\ year\}\ \{\n\ \ \ \ \ \ \ \ if\ \{\$month==12\}\ \{set\ month\ 0\;\ incr\ year\}\n\ \ \ \ \ \ \ \ clock\ format\ \[clock\ scan\ \"\[incr\ month\]/1/\$year\ \ 1\ day\ ago\"\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -format\ %d\n\ \ \ \ \}\ \n\}\ \;#\ end\ namespace\ date\n\nproc\ lcycle\ _list\ \{\n\ \ \ \ upvar\ \$_list\ list\n\ \ \ \ set\ list\ \[concat\ \[lrange\ \$list\ 1\ end\]\ \[list\ \[lindex\ \$list\ 0\]\]\]\n\}\nproc\ cbutton\ \{w\ x\ y\ text\ command\}\ \{\n\ \ \ \ set\ txt\ \[\$w\ create\ text\ \$x\ \$y\ -text\ \"\ \$text\ \"\]\n\ \ \ \ set\ btn\ \[eval\ \$w\ create\ rect\ \[\$w\ bbox\ \$txt\]\ \\\n\ \ \ \ \ \ \ \ -fill\ grey\ -outline\ grey\]\n\ \ \ \ \$w\ raise\ \$txt\n\ \ \ \ foreach\ i\ \[list\ \$txt\ \$btn\]\ \{\$w\ bind\ \$i\ <1>\ \$command\}\n\}\n\n#------\ test\ and\ demo\ code\ (terminate\ by\ closing\ the\ main\ window)\n\nif\ \{\$argv0\ eq\ \[info\ script\]\}\ \{\n\ \ \ \ date::chooser\ .1\n\ \ \ \ entry\ .2\ -textvar\ date::.1(date)\n\ \ \ \ regsub\ -all\ weekdays,\ \[array\ names\ date::.1\ weekdays,*\]\ \"\"\ languages\n\ \ \ \ foreach\ i\ \[lsort\ \$languages\]\ \{\n\ \ \ \ \ \ \ \ radiobutton\ .b\$i\ -text\ \$i\ -variable\ date::.1(-language)\ -value\ \$i\ -pady\ 0\n\ \ \ \ \}\n\ \ \ \ trace\ variable\ date::.1(-language)\ w\ \{date::display\ .1\;#\}\n\ \ \ \ checkbutton\ .mon\ -variable\ date::.1(-mon)\ -text\ \"Sunday\ starts\ week\"\n\ \ \ \ trace\ variable\ date::.1(-mon)\ w\ \{date::display\ .1\;#\}\n\ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ eval\ pack\ \[winfo\ children\ .\]\ -fill\ x\ -anchor\ w\n\ \n\ \ \ \ #\ example\ 2\n\ \ \ \ #\ requires\ tcl\ 8.5\n\ \ \ \ \n\ \ \ \ #\ set\ german\ clock\ format\n\ \ \ \ set\ clockformat\ \"%d.%m.%Y\"\n\ \ \ \ set\ ::DATE\ \[clock\ format\ \[clock\ seconds\]\ -format\ \$clockformat\]\n\ \n\ \ \ \ set\ w\ \[toplevel\ .x\]\n\ \ \ \ entry\ \$w.date\ -textvariable\ ::DATE\n\ \ \ \ button\ \$w.b\ -command\ \[list\ showCalendar\ %X\ %Y\ \$clockformat\]\n\ \n\ \ \ \ pack\ \$w.date\ \$w.b\ -side\ left\n\ \n\ \n\ \ \ \ proc\ showCalendar\ \{\ x\ y\ clockformat\}\ \{\n\ \ \ \ \ \ \ \ puts\ \"begin\ \$::DATE\"\n\ \ \ \ \ \ \ \ set\ w\ \[toplevel\ .d\]\n\ \ \ \ \ \ \ \ wm\ overrideredirect\ \$w\ 1\n\ \ \ \ \ \ \ \ frame\ \$w.f\ -borderwidth\ 2\ -relief\ solid\ -takefocus\ 0\n\ \ \ \ \ \ \ \ date::chooser\ \$w.f.d\ -language\ de\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -command\ \[list\ set\ ::SEMA\ close\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -textvariable\ ::DATE\ -clockformat\ \$clockformat\n\ \ \ \ \ \ \ \ pack\ \$w.f.d\n\ \ \ \ \ \ \ \ pack\ \$w.f\n\ \n\ \ \ \ \ \ \ \ lassign\ \[winfo\ pointerxy\ .\]\ x\ y\n\ \ \ \ \ \ \ \ #\ puts\ \"\$x\ \$y\"\n\ \ \ \ \ \ \ \ wm\ geometry\ \$w\ \"+\$\{x\}+\$\{y\}\"\n\ \n\ \ \ \ \ \ \ \ set\ _w\ \[grab\ current\]\n\ \ \ \ \ \ \ \ if\ \{\$_w\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ grab\ release\ \$_w\n\ \ \ \ \ \ \ \ \ \ \ \ grab\ set\ \$w\n\ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ set\ ::SEMA\ \"\"\n\ \ \ \ \ \ \ \ tkwait\ variable\ ::SEMA\n\ \n\ \ \ \ \ \ \ \ if\ \{\$_w\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ grab\ release\ \$w\n\ \ \ \ \ \ \ \ \ \ \ \ grab\ set\ \$_w\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ destroy\ \$w\n\ \ \ \ \ \ \ \ puts\ \"end\ \$::DATE\"\n\ \n\ \ \ \ \ \ \ \ puts\ \[.x.date\ get\]\n\ \n\ \ \ \ \}\n\}\n======\n\n----\n\nI\ certainly\ hope\ that\ Mozilla\ doesn't\ mangle\ the\ special\ characters\ on\ this\npage!\n\nIn\ the\ above\ code,\ everything\ is\ stored\ in\ static\ indexes\ in\ a\ single\ array.\nThis\ means\ that\ if\ one\ needs\ more\ than\ one\ of\ these\ widgets\ in\ an\ application,\nproblems\ occur.\n\n----\n\nThe\ author\ writes,\ in\ response\ to\ my\ description\ in\ an\ email:\n\nAs\ \"a\"\ is\ in\ the\ \"date\"\ namespace,\ it\ can\ be\ easily\ \"personalized\"\ to\ the\nwidget\ by\ changing,\ in\ the\ procedures\n\n======\nvariable\ a\n======\nto\n\n======\nvariable\ \$w\nupvar\ 0\ \$w\ a\n======\n\nThen\ \"a\"\ is\ a\ proc-local\ name\ tied\ to\ the\ real\ array,\ named\ after\ the\ widget.\n\nSome\ more\ changes\ are\ needed,\ as\ the\ language-specific\ data\ are\ also\ in\ a,\ and\ns\ hould\ remain\ in\ a\ single\ place\ -\ so\ better\ call\ it\ \"msg\"\ or\ so.\n\nSorry\ I\ can't\ test\ this\ right\ now,\ as\ I'm\ very\ busy\ with\ paywork...\ \ Maybe\nlater.\n\n----\n\n\[Donald\ Arseneau\]:\ \ I\ applied\ the\ idea\ of\ using\ the\ widget\ name\ as\ the\ array\nvariable\ name,\ entered\ above\ (hope\ that\ is\ OK).\ \ I\ also\ made\ the\ demo\ code\ run\nwhenever\ you\ execute\ datechooser.tcl\ as\ the\ main\ script\ (wish\ datechooser.tcl).\nI\ also\ changed\ the\ name\ of\ the\ format\ proc\ to\ formatMY\ (format\ month-year)\ to\navoid\ confusion.\ \ The\ default\ settings\ are\ now\ in\ the\ date::defaults\ array\nvariable,\ which\ gives\ its\ values\ to\ each\ new\ widget\ created\ by\ date::chooser.\nAfter\ creation,\ the\ language\ for\ an\ instance\ can\ be\ changed\ by\ performing:\n\n======\nset\ date::.startdate(language)\ de\ndate::display\ .startdate\n======\n\n----\n\nIf\ someone\ wants\ to\ come\ along\ and\ suggest\ specific\ code\ changes,\ let\ us\ know.\n\n----\n\nThe\ classic\ Tcl\ calendar\ application\ is\ \[ical\].\ \ Unfortunately,\ ical\ doesn't\nappear\ to\ be\ supported\ at\ this\ time.\n\n----\n\n\[hae\]\ 2008-06-03:\ \ added\ options:\ `-textvariable`,\ `-command`\ and\n`-clockformat`\ demonstrate\ usage\ in\ an\ example\n\ \n----\n\n\[MHo\]:\ \ Additional\ keyboard\ bindings\ would\ be\ fine\ (but\ perhaps\ somewhat\ndifficult\ to\ code...)\ so\ that\ one\ can\ operate\ the\ widget\ without\ using\ a\ mouse\n\;-)\n\n<<categories>>\ Package\ |\ GUI\ |\ Widget\ |\ Date\ and\ Time regexp2} CALL {my render {An i15d date chooser} \[WikiDbImage\ i15dcal.jpg\]\n\n**\ Summary\ **\n\n\[Richard\ Suchenwirth\]\ 2001-06-25:\ \ \[i15d\]:\ internationalized.\ This\ is\ the\nsecond\ attempt\ at\ a\ calendar\ widget\ (for\ the\ first\ see\ \[A\ little\ date\nchooser\]).\ Instead\ of\ fiddling\ packer\ geometry,\ it\ now\ has\ all\ controls\ on\ a\ncanvas\;\ displays\ days\ in\ neighboring\ months\ (grayed\ out,\ not\ selectable)\;\ you\ncan\ configure\ the\ weekday\ sequence\ to\ start\ with\ Sunday\ or\ Monday\;\ but\ best\ of\nall,\ allows\ on-the-fly\ reconfiguration\ of\ the\ language\ used\ for\ month\ and\nweekday\ names.\ Language\ data\ is\ provided\ for\ English,\ German,\ French,\ Greek,\nItalian,\ Russian,\ Swedish,\ Hebrew\ and\ Chinese\;\ feel\ free\ to\ add\ more.\ \ Enjoy!\n\n**\ See\ Also\ **\n\n\ \ \ \[i18n\ -\ writing\ for\ the\ world\]:\ \ \ \n\n**\ Description\ **\n\n----\n\nSomeone\ added\ Japanese\ (ja).\ \[MS\]\ did\ Spanish.\ \ \[JCW\]\ did\ Dutch\ (nl).\ \[GP-L\]\nadded\ some\ missing\ accents\ in\ French\ (fr).\ \ \[Peter\ Lewerin\]\ added\ Swedish\ (sv).\n\[ECS\]\ added\ Portuguese\ (pt).\ \[NB\]\ added\ Greek\ (gr).\ \ \[WJP\]\ added\ Plains\ Cree\n(crk),\ Nak'albun\ (Stuart\ Lake)\ dialect\ Carrier\ (crx-nak,\ and\ Lheidli\ dialect\nCarrier\ (crx-lhe).\ \ I'm\ afraid\ these\ disrupt\ the\ alignment\ of\ the\ radiobuttons,\nbut\ the\ dialects\ are\ different\ and\ in\ any\ case\ two-letter\ language\ codes\ are\npasse.\n\n----\n\n\[LV\]\ and\ \[RS\]\ talked\ (was\ it\ chat\ or\ email)\ about\ the\ use\ of\ embedded\ data\ vs.\nthe\ use\ of\ the\ \[tcl\]\ \[msgcat\]\ catalog\ functions.\ \ The\ pro\ of\ this\ is\ that\ one\ncould,\ with\ proper\ coding,\ add\ new\ languages\ without\ change\ to\ the\ software,\nand\ could\ get\ some\ reuse\ out\ of\ the\ data.\n\n\[RS\]\ pointed\ out\ the\ cons\ -\ he\ didn't\ want\ to\ use\ the\ msgcat\ -\ he\ wanted\ an\nall-in-one\ tcl\ script\ rather\ than\ a\ series\ of\ files.\ Perhaps\ both\ could\ be\naccomodated\ by\ someone\ providing\ some\ tcl\ scripts\ that\ take\ embedded\ tcl\ data\nand\ writing\ it\ out\ to\ the\ msg\ cat\;\ that\ way,\ the\ app\ could\ create/update\ one's\nmsgcat\ if\ new\ info\ were\ available....\n\n\[VL\]\ \ 2003-06-07:\ \ Perhaps\ you\ are\ looking\ for\ msgcatx?\ Extracts\nmsgcat-catalogues\ with\ some\ comments\ on\ where\ in\ the\ code\ and\ also\ the\ sort\ of\nobject\ the\ string\ is\ contained\ in.\ Part\ of\ my\ Mimers\ brunn\ project\n\[http://mimersbrunn.sf.net\],\ not\ done\ much\ work\ since\ last\ spring,\ but\ it\ is\ndefinitely\ usable\ and\ I'll\ be\ working\ on\ a\ UI\ to\ it\ when\ I\ get\ some\ spare\ntime.''\n\n\[CLN\]:\ \ It's\ not\ clear\ to\ me\ why\ msgcat\ and\ \"all-in-one\ tcl\ script\"\ are\nincompatible?\ \ A\ message\ catalog\ is\ just\ a\ Tcl\ script\ with\ one\ or\ more\ mcset\ or\nmcmset\ commands.\ \ Can't\ we\ have:\n\n======n\nmcset\ en\ Mon\ Monday\nmcset\ it\ Mon\ Lunedi\n...\n======\n\nor\n\n======\nmcmset\ en\ \{\n\ \ \ \ Mon\ Monday\n\ \ \ \ Tue\ Tuesday\n\ \ \ \ ...\n\}\nmcmset\ it\ \{\n\ \ \ \ Mon\ Lunedi\n\ \ \ \ Tue\ Martedi\n\ \ \ \ ...\n\}\n...\n======\n\nat\ the\ top\ of\ the\ script?\n\n\[RS\]:\ \ In\ my\ mind,\ this\ adds\ complexity\ without\ necessity.\ The\ day\ and\ month\nnames\ are\ \[list\]s\ so\ one\ can\ index\ into\ them.\ Making\ them\ scalar\ as\ proposed\nwould\ not\ make\ the\ code\ simpler...\n\n\[VL\]\ 2003-06-07:\ \ For\ small\ scripts\ this\ would\ be\ feasible,\ but\ it\ sort\ of\ntakes\ the\ point\ out\ of\ localization,\ the\ idea\ is\ to\ make\ it\ easy\ to\ translate\nwithout\ having\ to\ go\ into\ the\ code\ and\ do\ changes.\n\n\[LV\]:\ \ For\ that\ matter\ -\ perhaps\ some\ kind\ of\ conditional\ command\ -\ if\ this\ncatalog\ entry\ does\ not\ exist,\ then\ create\ it.\ \ However,\ the\ user\ would\ have\ to\nhave\ write\ permission\ in\ the\ catalog\ area\ -\ something\ that\ many\ of\ us\ would\ be\nunlikely\ to\ want\ to\ provide.\n\n\[VL\]\ 2003-06-07:\ \ The\ default\ if\ a\ catalogue\ is\ missing\ is\ to\ use\ the\ initial\nmessage,\ or\ '''en'''\ if\ it\ is\ provided.\ For\ a\ good\ idea\ of\ how\ to\ work\ with\nlocalizing\ your\ applications\ do\ take\ a\ look\ at\ the\n\[http://www.iro.umontreal.ca/contrib/po/HTML/%|%Free\ Translation\ Project\]\n\n\[SH\]\ 2003-07-08:\ \ Fixed\ bug\ in\ which\ days\ for\ 'pt'\ display\ instead\ of\ english,\nand\ 'pt'\ missing.\n\n----\n\nWhen\ I\ resize\ this\ widget,\ the\ numbers\ and\ words\ don't\ grow\ -\ is\ there\ a\ way\ to\ncode\ Tk\ widgets\ so\ that\ one\ can\ change\ the\ size\ (so\ that\ old\ people\ can\ read\nthe\ words...).\n\n======\npackage\ require\ msgcat\npackage\ require\ Tk\nnamespace\ eval\ date\ \{\n\ \ \ \ proc\ chooser\ \{w\ args\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ variable\ defaults\n\ \ \ \ \ \ \ \ array\ set\ \$w\ \[array\ get\ defaults\]\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \n\ \ \ \ \ \ \ \ set\ now\ \[clock\ scan\ now\]\n\ \ \ \ \ \ \ \ set\ a(year)\ \[clock\ format\ \$now\ -format\ \"%Y\"\]\n\ \ \ \ \ \ \ \ scan\ \[clock\ format\ \$now\ -format\ \"%m\"\]\ %d\ a(month)\n\ \ \ \ \ \ \ \ scan\ \[clock\ format\ \$now\ -format\ \"%d\"\]\ %d\ a(day)\n\ \n\ \ \ \ \ \ \ \ array\ set\ a\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ -font\ \{Helvetica\ 9\}\ -titlefont\ \{Helvetica\ 12\}\ -bg\ white\n\ \ \ \ \ \ \ \ \ \ \ \ -highlight\ orange\ -mon\ 1\ -langauge\ en\ -textvariable\ \{\}\n\ \ \ \ \ \ \ \ \ \ \ \ -command\ \{\}\ -clockformat\ \"%m/%d/%Y\"\ -showpast\ 1\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ #\ The\ -mon\ switch\ gives\ the\ position\ of\ Monday\ (1\ or\ 0)\n\ \ \ \ \ \ \ \ array\ set\ a\ \$args\n\ \ \ \ \ \ \ \ set\ a(canvas)\ \[canvas\ \$w\ -bg\ \$a(-bg)\ -width\ 200\ -height\ 180\]\n\ \ \ \ \ \ \ \ \$w\ bind\ day\ <1>\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ item\ \[%W\ find\ withtag\ current\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ date::%W(day)\ \[%W\ itemcget\ \$item\ -text\]\n\ \ \ \ \ \ \ \ \ \ \ \ date::display\ %W\n\ \ \ \ \ \ \ \ \ \ \ \ date::HandleCallback\ %W\n\ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ if\ \{\ \$a(-textvariable)\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ tmp\ \[set\ \$a(-textvariable)\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$tmp\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ date\ \[clock\ scan\ \$tmp\ -format\ \$a(-clockformat)\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ a(thisday)\ \ \ \[clock\ format\ \$date\ -format\ %d\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ a(thismonth)\ \[clock\ format\ \$date\ -format\ %m\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ a(thisyear)\ \ \[clock\ format\ \$date\ -format\ %Y\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ cbutton\ \$w\ 60\ \ 10\ <<\ \{date::adjust\ %W\ \ 0\ -1\}\n\ \ \ \ \ \ \ \ cbutton\ \$w\ 80\ \ 10\ <\ \ \{date::adjust\ %W\ -1\ \ 0\}\n\ \ \ \ \ \ \ \ cbutton\ \$w\ 120\ 10\ >\ \ \{date::adjust\ %W\ \ 1\ \ 0\}\n\ \ \ \ \ \ \ \ cbutton\ \$w\ 140\ 10\ >>\ \{date::adjust\ %W\ \ 0\ \ 1\}\n\ \ \ \ \ \ \ \ display\ \$w\n\ \ \ \ \ \ \ \ set\ w\n\ \ \ \ \}\n\n\ \ \ \ proc\ adjust\ \{w\ dmonth\ dyear\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \n\ \ \ \ \ \ \ \ incr\ a(year)\ \ \$dyear\n\ \ \ \ \ \ \ \ incr\ a(month)\ \$dmonth\n\ \ \ \ \ \ \ \ if\ \{\$a(month)>12\}\ \{set\ a(month)\ 1\;\ incr\ a(year)\}\n\ \ \ \ \ \ \ \ if\ \{\$a(month)<1\}\ \ \{set\ a(month)\ 12\;\ incr\ a(year)\ -1\}\n\ \ \ \ \ \ \ \ set\ maxday\ \[numberofdays\ \$a(month)\ \$a(year)\]\n\ \ \ \ \ \ \ \ if\ \{\$maxday\ <\ \$a(day)\}\ \{set\ a(day)\ \$maxday\}\n\ \ \ \ \ \ \ \ display\ \$w\n\ \ \ \ \}\n\n\ \ \ \ proc\ display\ \{w\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \n\ \ \ \ \ \ \ \ set\ c\ \$a(canvas)\n\ \ \ \ \ \ \ \ foreach\ tag\ \{title\ otherday\ day\}\ \{\$c\ delete\ \$tag\}\n\ \ \ \ \ \ \ \ set\ x0\ 20\;\ set\ x\ \$x0\;\ set\ y\ 50\n\ \ \ \ \ \ \ \ set\ dx\ 25\;\ set\ dy\ 20\n\ \ \ \ \ \ \ \ set\ xmax\ \[expr\ \{\$x0+\$dx*6\}\]\n\ \ \ \ \ \ \ \ set\ a(date)\ \[clock\ scan\ \$a(month)/\$a(day)/\$a(year)\]\n\ \ \ \ \ \ \ \ set\ title\ \[formatMY\ \$w\ \[monthname\ \$w\ \$a(month)\]\ \$a(year)\]\n\ \ \ \ \ \ \ \ \$c\ create\ text\ \[expr\ (\$xmax+\$dx)/2\]\ 30\ -text\ \$title\ -fill\ blue\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -font\ \$a(-titlefont)\ -tag\ title\n\ \ \ \ \ \ \ \ set\ weekdays\ \$a(weekdays,\$a(-language))\n\ \ \ \ \ \ \ \ if\ !\$a(-mon)\ \{lcycle\ weekdays\}\n\ \ \ \ \ \ \ \ foreach\ i\ \$weekdays\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$c\ create\ text\ \$x\ \$y\ -text\ \$i\ -fill\ blue\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -font\ \$a(-font)\ -tag\ title\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ x\ \$dx\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ set\ first\ \$a(month)/1/\$a(year)\n\ \ \ \ \ \ \ \ set\ weekday\ \[clock\ format\ \[clock\ scan\ \$first\]\ -format\ %w\]\n\ \ \ \ \ \ \ \ if\ !\$a(-mon)\ \{set\ weekday\ \[expr\ \{(\$weekday+6)%7\}\]\}\n\ \ \ \ \ \ \ \ set\ x\ \[expr\ \{\$x0+\$weekday*\$dx\}\]\n\ \ \ \ \ \ \ \ set\ x1\ \$x\;\ set\ offset\ 0\n\ \ \ \ \ \ \ \ incr\ y\ \$dy\n\ \ \ \ \ \ \ \ while\ \{\$weekday\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ t\ \[clock\ scan\ \"\$first\ \[incr\ offset\]\ days\ ago\"\]\n\ \ \ \ \ \ \ \ \ \ \ \ scan\ \[clock\ format\ \$t\ -format\ \"%d\"\]\ %d\ day\n\ \ \ \ \ \ \ \ \ \ \ \ \$c\ create\ text\ \[incr\ x1\ -\$dx\]\ \$y\ -text\ \$day\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -fill\ grey\ -font\ \$a(-font)\ -tag\ otherday\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ weekday\ -1\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ set\ dmax\ \[numberofdays\ \$a(month)\ \$a(year)\]\n\ \ \ \ \ \ \ \ for\ \{set\ d\ 1\}\ \{\$d<=\$dmax\}\ \{incr\ d\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{(\$a(-showpast)\ ==\ 0)\ &&\ (\$d<\$a(thisday))\ &&\ (\$a(month)\ <=\ \$a(thismonth))\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ &&\ (\$a(year)\ <=\ \$a(thisyear))\ \}\ \{\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ id\ \[\$c\ create\ text\ \$x\ \$y\ -text\ \$d\ -fill\ grey\ -tag\ otherday\ -font\ \$a(-font)\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ id\ \[\$c\ create\ text\ \$x\ \$y\ -text\ \$d\ -tag\ day\ -font\ \$a(-font)\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$d==\$a(day)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ eval\ \$c\ create\ rect\ \[\$c\ bbox\ \$id\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -fill\ \$a(-highlight)\ -outline\ \$a(-highlight)\ -tag\ day\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \$c\ raise\ \$id\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[incr\ x\ \$dx\]>\$xmax\}\ \{set\ x\ \$x0\;\ incr\ y\ \$dy\}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ if\ \{\$x\ !=\ \$x0\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ for\ \{set\ d\ 1\}\ \{\$x<=\$xmax\}\ \{incr\ d\;\ incr\ x\ \$dx\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$c\ create\ text\ \$x\ \$y\ -text\ \$d\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -fill\ grey\ -font\ \$a(-font)\ -tag\ otherday\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ if\ \{\ \$a(-textvariable)\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ #\ puts\ \"\[info\ level\ 0\]:\ \$a(-clockformat)\"\n\ \ \ \ \ \ \ \ \ \ \ \ set\ \$a(-textvariable)\ \[clock\ format\ \$a(date)\ -format\ \$a(-clockformat)\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \n\ \ \ \ proc\ HandleCallback\ \{w\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \ \ \ \ \ \ \ if\ \{\ \$a(-command)\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ uplevel\ \\#0\ \$a(-command)\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \n\ \ \ \ proc\ formatMY\ \{w\ month\ year\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \n\ \ \ \ \ \ \ \ if\ !\[info\ exists\ a(format,\$a(-language))\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ format\ \"%m\ %y\"\ \;#\ default\n\ \ \ \ \ \ \ \ \}\ else\ \{set\ format\ \$a(format,\$a(-language))\}\n\ \ \ \ \ \ \ \ foreach\ \{from\ to\}\ \[list\ %m\ \$month\ %y\ \$year\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ regsub\ \$from\ \$format\ \$to\ format\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ subst\ \$format\n\ \ \ \ \}\n\n\ \ \ \ proc\ monthname\ \{w\ month\ \{language\ default\}\}\ \{\n\ \ \ \ \ \ \ \ variable\ \$w\n\ \ \ \ \ \ \ \ upvar\ 0\ \$w\ a\n\ \n\ \ \ \ \ \ \ \ if\ \{\$language==\"default\"\}\ \{set\ language\ \$a(-language)\}\n\ \ \ \ \ \ \ \ if\ \{\[info\ exists\ a(mn,\$language)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ res\ \[lindex\ \$a(mn,\$language)\ \$month\]\n\ \ \ \ \ \ \ \ \}\ else\ \{set\ res\ \$month\}\n\ \ \ \ \}\n\ \n\ \ \ \ variable\ defaults\n\n\ \ \ \ array\ set\ defaults\ \{\n\ \ \ \ \ \ \ \ -language\ en\n\ \ \ \ \ \ \ \ \ mn,crk\ \{\n\ \ \ \ \ \ \ \ \ .\ Kis\\u01E3p\\u012Bsim\ Mikisiwip\\u012Bsim\ Niskip\\u012Bsim\ Ay\\u012Bkip\\u012Bsim\n\ \ \ \ \ \ \ \ \ S\\u0101kipak\\u0101wip\\u012Bsim\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ P\\u0101sk\\u0101wihowip\\u012Bsim\ Paskowip\\u012Bsim\ Ohpahowip\\u012Bsim\ \ \ \ \ \n\ \ \ \ \ \ \ \ \ N\\u014Dcihitowip\\u012Bsim\ Pin\\u0101skowip\\u012Bsim\ Ihkopiwip\\u012Bsim\n\ \ \ \ \ \ \ \ \ Paw\\u0101cakinas\\u012Bsip\\u012Bsim\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,crk\ \{P\\u01E3\ N\\u01E3s\ Nis\ N\\u01E3\ Niy\ Nik\ Ay\}\n\ \n\ \ \ \ \ \ \ \ mn,crx-nak\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ .\ \{Sacho\ Ooza'\}\ \{Chuzsul\ Ooza'\}\ \{Chuzcho\ Ooza'\}\ \{Shin\ Ooza'\}\ \{Dugoos\ Ooza'\}\ \{Dang\ Ooza'\}\\\n\ \ \ \ \ \ \ \ \ \ \ \{Talo\ Ooza'\}\ \{Gesul\ Ooza'\}\ \{Bit\ Ooza'\}\ \{Lhoh\ Ooza'\}\ \{Banghan\ Nuts'ukih\}\ \{Sacho\ Din'ai\}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,crx-nak\ \{Ji\ Jh\ WN\ WT\ WD\ Ts\ Sa\}\n\ \n\ \ \ \ \ \ \ \ mn,crx-lhe\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ .\ \{'Elhdzichonun\}\ \{Yussulnun\}\ \{Datsannadulhnun\}\ \{Dulats'eknun\}\ \{Dugoosnun\}\ \{Daingnun\}\\\n\ \ \ \ \ \ \ \ \ \ \ \ \{Gesnun\}\ \{Nadlehcho\}\ \{Nadlehyaz\}\ \{Lhewhnandelnun\}\ \{Benats'ukuihnun\}\ \{'Elhdziyaznun\}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,crx-lhe\ \{Ji\ Jh\ WN\ WT\ WD\ Ts\ Sa\}\n\ \n\ \ \ \ \ \ \ \ mn,de\ \{\n\ \ \ \ \ \ \ \ .\ Januar\ Februar\ März\ April\ Mai\ Juni\ Juli\ August\n\ \ \ \ \ \ \ \ September\ Oktober\ November\ Dezember\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,de\ \{So\ Mo\ Di\ Mi\ Do\ Fr\ Sa\}\n\ \n\ \ \ \ \ \ \ \ mn,en\ \{\n\ \ \ \ \ \ \ \ .\ January\ February\ March\ April\ May\ June\ July\ August\n\ \ \ \ \ \ \ \ September\ October\ November\ December\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,en\ \{Sun\ Mon\ Tue\ Wed\ Thu\ Fri\ Sat\}\n\ \n\ \ \ \ \ \ \ \ mn,es\ \{\n\ \ \ \ \ \ \ \ .\ Enero\ Febrero\ Marzo\ Abril\ Mayo\ Junio\ Julio\ Agosto\n\ \ \ \ \ \ \ \ Septiembre\ Octubre\ Noviembre\ Diciembre\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,es\ \{Do\ Lu\ Ma\ Mi\ Ju\ Vi\ Sa\}\n\ \n\ \ \ \ \ \ \ \ mn,fr\ \{\n\ \ \ \ \ \ \ \ .\ Janvier\ Février\ Mars\ Avril\ Mai\ Juin\ Juillet\ Août\n\ \ \ \ \ \ \ \ Septembre\ Octobre\ Novembre\ Décembre\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,fr\ \{Di\ Lu\ Ma\ Me\ Je\ Ve\ Sa\}\n\ \n\ \ \ \ \ \ \ \ mn,gr\ \{\n\ \ \ \ \ \ \ \ .\ ÎýýανοÏýýάÏýýιοÏýý\ ΦεβÏýýοÏýýάÏýýιοÏýý\ ÎýýάÏýýÏýýιοÏýý\ ÎýýÏýýÏýýίλιοÏýý\ ÎýýαÎýýοÏýý\ ÎýýοÏýýνιοÏýý\ ÎýýοÏýýλιοÏýý\ ÎýýÏýýγοÏýýÏýýÏýýοÏýý\n\ \ \ \ \ \ \ \ ΣεÏýýÏýýÎýýμβÏýýιοÏýý\ ÎýýκÏýýÏýýμβÏýýιοÏýý\ ÎýýοÎýýμβÏýýιοÏýý\ ÎýýεκÎýýμβÏýýιοÏýý\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,gr\ \{ÎýýÏýýÏýý\ ÎýýεÏýý\ TÏýýη\ ΤεÏýý\ Î\ εμ\ Î\ αÏýý\ Σαβ\}\n\ \n\ \ \ \ \ \ \ \ mn,he\ \{\n\ \ \ \ \ \ \ \ \ .\ ×ýý×\ ×ýý×ýýר\ פ×ýýר×ýý×ýýר\ ×ýýרץ\ ×ýýפר×ýý×ýý\ ×ýý×ýý×ýý\ ×ýý×ýý×\ ×ýý\ ×ýý×ýý×ýý×ýý\ ×ýý×ýý×ýý×ýýס×ýý\ ספ×ýý×ýý×ýýר\ ×ýý×ýýק×ýý×ýý×ýýר\ ×\ ×ýý×ýý×ýý×ýýר\ ×ýýצ×ýý×ýýר\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,he\ \{ר×ýýש×ýý×ýý\ ש×\ ×ýý\ ש×ýý×ýýש×ýý\ ר×ýý×ýýע×ýý\ ×ýý×ýý×ýýש×ýý\ ש×ýýש×ýý\ ש×ýýת\}\n\ \ \ \ \ \ \ \ mn,it\ \{\n\ \ \ \ \ \ \ \ .\ Gennaio\ Febraio\ Marte\ Aprile\ Maggio\ Giugno\ Luglio\ Agosto\n\ \ \ \ \ \ \ \ Settembre\ Ottobre\ Novembre\ Dicembre\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,it\ \{Do\ Lu\ Ma\ Me\ Gi\ Ve\ Sa\}\n\ \n\ \ \ \ \ \ \ \ format,ja\ \{%y\\u5e74\ %m\\u6708\}\n\ \ \ \ \ \ \ \ weekdays,ja\ \{\\u65e5\ \\u6708\ \\u706b\ \\u6c34\ \\u6728\ \\u91d1\ \\u571f\}\n\ \n\ \ \ \ \ \ \ \ mn,nl\ \{\n\ \ \ \ \ \ \ \ .\ januari\ februari\ maart\ april\ mei\ juni\ juli\ augustus\n\ \ \ \ \ \ \ \ september\ oktober\ november\ december\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,nl\ \{Zo\ Ma\ Di\ Wo\ Do\ Vr\ Za\}\n\ \n\ \ \ \ \ \ \ \ mn,ru\ \{\n\ \ \ \ \ \ \ \ .\ \\u042F\\u043D\\u0432\\u0430\\u0440\\u044C\n\ \ \ \ \ \ \ \ \\u0424\\u0435\\u0432\\u0440\\u0430\\u043B\\u044C\ \\u041C\\u0430\\u0440\\u0442\n\ \ \ \ \ \ \ \ \\u0410\\u043F\\u0440\\u0435\\u043B\\u044C\ \\u041C\\u0430\\u0439\n\ \ \ \ \ \ \ \ \\u0418\\u044E\\u043D\\u044C\ \\u0418\\u044E\\u043B\\u044C\n\ \ \ \ \ \ \ \ \\u0410\\u0432\\u0433\\u0443\\u0441\\u0442\n\ \ \ \ \ \ \ \ \\u0421\\u0435\\u043D\\u0442\\u044F\\u0431\\u0440\\u044C\n\ \ \ \ \ \ \ \ \\u041E\\u043A\\u0442\\u044F\\u0431\\u0440\\u044C\ \\u041D\\u043E\\u044F\\u0431\\u0440\\u044C\n\ \ \ \ \ \ \ \ \\u0414\\u0435\\u043A\\u0430\\u0431\\u0440\\u044C\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,ru\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \\u432\\u43e\\u441\ \\u43f\\u43e\\u43d\ \\u432\\u442\\u43e\ \\u441\\u440\\u435\n\ \ \ \ \ \ \ \ \ \ \ \ \\u447\\u435\\u442\ \\u43f\\u44f\\u442\ \\u441\\u443\\u431\n\ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ mn,sv\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ .\ januari\ februari\ mars\ april\ maj\ juni\ juli\ augusti\n\ \ \ \ \ \ \ \ \ \ \ \ september\ oktober\ november\ december\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,sv\ \{s\\u00F6n\ m\\u00E5n\ tis\ ons\ tor\ fre\ l\\u00F6r\}\n\ \n\ \ \ \ \ \ \ \ mn,pt\ \{\n\ \ \ \ \ \ \ \ .\ Janeiro\ Fevereiro\ Mar\\u00E7o\ Abril\ Maio\ Junho\n\ \ \ \ \ \ \ \ Julho\ Agosto\ Setembro\ Outubro\ Novembro\ Dezembro\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,pt\ \{Dom\ Seg\ Ter\ Qua\ Qui\ Sex\ Sab\}\n\ \n\ \ \ \ \ \ \ \ format,zh\ \{%y\\u5e74\ %m\\u6708\}\n\ \ \ \ \ \ \ \ mn,zh\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ .\ \\u4e00\ \\u4e8c\ \\u4e09\ \\u56db\ \\u4e94\ \\u516d\ \\u4e03\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \\u516b\ \\u4e5d\ \\u5341\ \\u5341\\u4e00\ \\u5341\\u4e8c\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,zh\ \{\\u65e5\ \\u4e00\ \\u4e8c\ \\u4e09\ \\u56db\ \\u4e94\ \\u516d\}\n\ \ \ \ \ \ \ \ mn,fi\ \{\n\ \ \ \ \ \ \ \ \ \ .\ Tammikuu\ Helmikuu\ Maaliskuu\ Huhtikuu\ Toukokuu\ Kesäkuu\n\ \ \ \ \ \ \ \ \ \ Heinäkuu\ Elokuu\ Syyskuu\ Lokakuu\ Marraskuu\ Joulukuu\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,fi\ \{Ma\ Ti\ Ke\ To\ Pe\ La\ Su\}\n\ \ \ \ \ \ \ \ mn,tr\ \{\n\ \ \ \ \ \ \ \ \ \ \ .\ ocak\ \\u015fubat\ mart\ nisan\ may\\u0131s\ haziran\ temmuz\ a\\u011fustos\ eyl\\u00FCl\ ekim\ kas\\u0131m\ aral\\u0131k\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ weekdays,tr\ \{pa'tesi\ sa\ \\u00e7a\ pe\ cu\ cu'tesi\ pa\}\n\ \ \ \ \}\n\n\ \ \ \ proc\ numberofdays\ \{month\ year\}\ \{\n\ \ \ \ \ \ \ \ if\ \{\$month==12\}\ \{set\ month\ 0\;\ incr\ year\}\n\ \ \ \ \ \ \ \ clock\ format\ \[clock\ scan\ \"\[incr\ month\]/1/\$year\ \ 1\ day\ ago\"\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -format\ %d\n\ \ \ \ \}\ \n\}\ \;#\ end\ namespace\ date\n\nproc\ lcycle\ _list\ \{\n\ \ \ \ upvar\ \$_list\ list\n\ \ \ \ set\ list\ \[concat\ \[lrange\ \$list\ 1\ end\]\ \[list\ \[lindex\ \$list\ 0\]\]\]\n\}\nproc\ cbutton\ \{w\ x\ y\ text\ command\}\ \{\n\ \ \ \ set\ txt\ \[\$w\ create\ text\ \$x\ \$y\ -text\ \"\ \$text\ \"\]\n\ \ \ \ set\ btn\ \[eval\ \$w\ create\ rect\ \[\$w\ bbox\ \$txt\]\ \\\n\ \ \ \ \ \ \ \ -fill\ grey\ -outline\ grey\]\n\ \ \ \ \$w\ raise\ \$txt\n\ \ \ \ foreach\ i\ \[list\ \$txt\ \$btn\]\ \{\$w\ bind\ \$i\ <1>\ \$command\}\n\}\n\n#------\ test\ and\ demo\ code\ (terminate\ by\ closing\ the\ main\ window)\n\nif\ \{\$argv0\ eq\ \[info\ script\]\}\ \{\n\ \ \ \ date::chooser\ .1\n\ \ \ \ entry\ .2\ -textvar\ date::.1(date)\n\ \ \ \ regsub\ -all\ weekdays,\ \[array\ names\ date::.1\ weekdays,*\]\ \"\"\ languages\n\ \ \ \ foreach\ i\ \[lsort\ \$languages\]\ \{\n\ \ \ \ \ \ \ \ radiobutton\ .b\$i\ -text\ \$i\ -variable\ date::.1(-language)\ -value\ \$i\ -pady\ 0\n\ \ \ \ \}\n\ \ \ \ trace\ variable\ date::.1(-language)\ w\ \{date::display\ .1\;#\}\n\ \ \ \ checkbutton\ .mon\ -variable\ date::.1(-mon)\ -text\ \"Sunday\ starts\ week\"\n\ \ \ \ trace\ variable\ date::.1(-mon)\ w\ \{date::display\ .1\;#\}\n\ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ eval\ pack\ \[winfo\ children\ .\]\ -fill\ x\ -anchor\ w\n\ \n\ \ \ \ #\ example\ 2\n\ \ \ \ #\ requires\ tcl\ 8.5\n\ \ \ \ \n\ \ \ \ #\ set\ german\ clock\ format\n\ \ \ \ set\ clockformat\ \"%d.%m.%Y\"\n\ \ \ \ set\ ::DATE\ \[clock\ format\ \[clock\ seconds\]\ -format\ \$clockformat\]\n\ \n\ \ \ \ set\ w\ \[toplevel\ .x\]\n\ \ \ \ entry\ \$w.date\ -textvariable\ ::DATE\n\ \ \ \ button\ \$w.b\ -command\ \[list\ showCalendar\ %X\ %Y\ \$clockformat\]\n\ \n\ \ \ \ pack\ \$w.date\ \$w.b\ -side\ left\n\ \n\ \n\ \ \ \ proc\ showCalendar\ \{\ x\ y\ clockformat\}\ \{\n\ \ \ \ \ \ \ \ puts\ \"begin\ \$::DATE\"\n\ \ \ \ \ \ \ \ set\ w\ \[toplevel\ .d\]\n\ \ \ \ \ \ \ \ wm\ overrideredirect\ \$w\ 1\n\ \ \ \ \ \ \ \ frame\ \$w.f\ -borderwidth\ 2\ -relief\ solid\ -takefocus\ 0\n\ \ \ \ \ \ \ \ date::chooser\ \$w.f.d\ -language\ de\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -command\ \[list\ set\ ::SEMA\ close\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -textvariable\ ::DATE\ -clockformat\ \$clockformat\n\ \ \ \ \ \ \ \ pack\ \$w.f.d\n\ \ \ \ \ \ \ \ pack\ \$w.f\n\ \n\ \ \ \ \ \ \ \ lassign\ \[winfo\ pointerxy\ .\]\ x\ y\n\ \ \ \ \ \ \ \ #\ puts\ \"\$x\ \$y\"\n\ \ \ \ \ \ \ \ wm\ geometry\ \$w\ \"+\$\{x\}+\$\{y\}\"\n\ \n\ \ \ \ \ \ \ \ set\ _w\ \[grab\ current\]\n\ \ \ \ \ \ \ \ if\ \{\$_w\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ grab\ release\ \$_w\n\ \ \ \ \ \ \ \ \ \ \ \ grab\ set\ \$w\n\ \ \ \ \ \ \ \ \}\n\ \n\ \ \ \ \ \ \ \ set\ ::SEMA\ \"\"\n\ \ \ \ \ \ \ \ tkwait\ variable\ ::SEMA\n\ \n\ \ \ \ \ \ \ \ if\ \{\$_w\ ne\ \{\}\ \}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ grab\ release\ \$w\n\ \ \ \ \ \ \ \ \ \ \ \ grab\ set\ \$_w\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ destroy\ \$w\n\ \ \ \ \ \ \ \ puts\ \"end\ \$::DATE\"\n\ \n\ \ \ \ \ \ \ \ puts\ \[.x.date\ get\]\n\ \n\ \ \ \ \}\n\}\n======\n\n----\n\nI\ certainly\ hope\ that\ Mozilla\ doesn't\ mangle\ the\ special\ characters\ on\ this\npage!\n\nIn\ the\ above\ code,\ everything\ is\ stored\ in\ static\ indexes\ in\ a\ single\ array.\nThis\ means\ that\ if\ one\ needs\ more\ than\ one\ of\ these\ widgets\ in\ an\ application,\nproblems\ occur.\n\n----\n\nThe\ author\ writes,\ in\ response\ to\ my\ description\ in\ an\ email:\n\nAs\ \"a\"\ is\ in\ the\ \"date\"\ namespace,\ it\ can\ be\ easily\ \"personalized\"\ to\ the\nwidget\ by\ changing,\ in\ the\ procedures\n\n======\nvariable\ a\n======\nto\n\n======\nvariable\ \$w\nupvar\ 0\ \$w\ a\n======\n\nThen\ \"a\"\ is\ a\ proc-local\ name\ tied\ to\ the\ real\ array,\ named\ after\ the\ widget.\n\nSome\ more\ changes\ are\ needed,\ as\ the\ language-specific\ data\ are\ also\ in\ a,\ and\ns\ hould\ remain\ in\ a\ single\ place\ -\ so\ better\ call\ it\ \"msg\"\ or\ so.\n\nSorry\ I\ can't\ test\ this\ right\ now,\ as\ I'm\ very\ busy\ with\ paywork...\ \ Maybe\nlater.\n\n----\n\n\[Donald\ Arseneau\]:\ \ I\ applied\ the\ idea\ of\ using\ the\ widget\ name\ as\ the\ array\nvariable\ name,\ entered\ above\ (hope\ that\ is\ OK).\ \ I\ also\ made\ the\ demo\ code\ run\nwhenever\ you\ execute\ datechooser.tcl\ as\ the\ main\ script\ (wish\ datechooser.tcl).\nI\ also\ changed\ the\ name\ of\ the\ format\ proc\ to\ formatMY\ (format\ month-year)\ to\navoid\ confusion.\ \ The\ default\ settings\ are\ now\ in\ the\ date::defaults\ array\nvariable,\ which\ gives\ its\ values\ to\ each\ new\ widget\ created\ by\ date::chooser.\nAfter\ creation,\ the\ language\ for\ an\ instance\ can\ be\ changed\ by\ performing:\n\n======\nset\ date::.startdate(language)\ de\ndate::display\ .startdate\n======\n\n----\n\nIf\ someone\ wants\ to\ come\ along\ and\ suggest\ specific\ code\ changes,\ let\ us\ know.\n\n----\n\nThe\ classic\ Tcl\ calendar\ application\ is\ \[ical\].\ \ Unfortunately,\ ical\ doesn't\nappear\ to\ be\ supported\ at\ this\ time.\n\n----\n\n\[hae\]\ 2008-06-03:\ \ added\ options:\ `-textvariable`,\ `-command`\ and\n`-clockformat`\ demonstrate\ usage\ in\ an\ example\n\ \n----\n\n\[MHo\]:\ \ Additional\ keyboard\ bindings\ would\ be\ fine\ (but\ perhaps\ somewhat\ndifficult\ to\ code...)\ so\ that\ one\ can\ operate\ the\ widget\ without\ using\ a\ mouse\n\;-)\n\n<<categories>>\ Package\ |\ GUI\ |\ Widget\ |\ Date\ and\ Time} CALL {my revision {An i15d date chooser}} CALL {::oo::Obj6154590 process revision/An+i15d+date+chooser} CALL {::oo::Obj6154588 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