home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: node28_ct.html
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
90%
| dexvert
| Hypertext Markup Language File (text/html)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| HTML document text
| default (weak)
| |
99%
| file
| LaTeX document text
| default
| |
98%
| file
| exported SGML document text
| default
| |
97%
| file
| exported SGML document, ASCII text
| default
| |
80%
| TrID
| HyperText Markup Language with DOCTYPE
| default
| |
19%
| TrID
| HyperText Markup Language
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| gt2
| HTML (Hyper Text Markup Language) Datei
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| text/html
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 57 69 | 64 67 65 74 20 63 6f 6d |ts of Wi|dget com|
|000000b0| 70 69 6c 61 74 69 6f 6e | 3c 2f 54 49 54 4c 45 3e |pilation|</TITLE>|
|000000c0| 0a 0a 3c 4d 45 54 41 20 | 48 54 54 50 2d 45 51 55 |..<META |HTTP-EQU|
|000000d0| 49 56 3d 22 43 6f 6e 74 | 65 6e 74 2d 54 79 70 65 |IV="Cont|ent-Type|
|000000e0| 22 20 43 4f 4e 54 45 4e | 54 3d 22 74 65 78 74 2f |" CONTEN|T="text/|
|000000f0| 68 74 6d 6c 3b 20 63 68 | 61 72 73 65 74 3d 75 74 |html; ch|arset=ut|
|00000100| 66 2d 38 22 3e 0a 3c 4d | 45 54 41 20 4e 41 4d 45 |f-8">.<M|ETA NAME|
|00000110| 3d 22 76 69 65 77 70 6f | 72 74 22 20 43 4f 4e 54 |="viewpo|rt" CONT|
|00000120| 45 4e 54 3d 22 77 69 64 | 74 68 3d 64 65 76 69 63 |ENT="wid|th=devic|
|00000130| 65 2d 77 69 64 74 68 2c | 20 69 6e 69 74 69 61 6c |e-width,| initial|
|00000140| 2d 73 63 61 6c 65 3d 31 | 2e 30 22 3e 0a 3c 4d 45 |-scale=1|.0">.<ME|
|00000150| 54 41 20 4e 41 4d 45 3d | 22 47 65 6e 65 72 61 74 |TA NAME=|"Generat|
|00000160| 6f 72 22 20 43 4f 4e 54 | 45 4e 54 3d 22 4c 61 54 |or" CONT|ENT="LaT|
|00000170| 65 58 32 48 54 4d 4c 20 | 76 32 30 32 32 22 3e 0a |eX2HTML |v2022">.|
|00000180| 0a 3c 4c 49 4e 4b 20 52 | 45 4c 3d 22 53 54 59 4c |.<LINK R|EL="STYL|
|00000190| 45 53 48 45 45 54 22 20 | 48 52 45 46 3d 22 45 78 |ESHEET" |HREF="Ex|
|000001a0| 74 65 6e 64 69 6e 67 2e | 63 73 73 22 3e 0a 0a 3c |tending.|css">..<|
|000001b0| 4c 49 4e 4b 20 52 45 4c | 3d 22 6e 65 78 74 22 20 |LINK REL|="next" |
|000001c0| 48 52 45 46 3d 22 6e 6f | 64 65 32 39 5f 6d 6e 2e |HREF="no|de29_mn.|
|000001d0| 68 74 6d 6c 22 3e 0a 3c | 4c 49 4e 4b 20 52 45 4c |html">.<|LINK REL|
|000001e0| 3d 22 70 72 65 76 69 6f | 75 73 22 20 48 52 45 46 |="previo|us" HREF|
|000001f0| 3d 22 6e 6f 64 65 32 37 | 5f 6d 6e 2e 68 74 6d 6c |="node27|_mn.html|
|00000200| 22 3e 0a 3c 4c 49 4e 4b | 20 52 45 4c 3d 22 75 70 |">.<LINK| REL="up|
|00000210| 22 20 48 52 45 46 3d 22 | 6e 6f 64 65 32 37 5f 6d |" HREF="|node27_m|
|00000220| 6e 2e 68 74 6d 6c 22 3e | 0a 3c 4c 49 4e 4b 20 52 |n.html">|.<LINK R|
|00000230| 45 4c 3d 22 6e 65 78 74 | 22 20 48 52 45 46 3d 22 |EL="next|" HREF="|
|00000240| 6e 6f 64 65 32 39 5f 6d | 6e 2e 68 74 6d 6c 22 3e |node29_m|n.html">|
|00000250| 0a 3c 2f 48 45 41 44 3e | 0a 20 0a 3c 42 4f 44 59 |.</HEAD>|. .<BODY|
|00000260| 20 62 67 63 6f 6c 6f 72 | 3d 22 23 66 66 66 66 66 | bgcolor|="#fffff|
|00000270| 66 22 20 74 65 78 74 3d | 22 23 30 30 30 30 30 30 |f" text=|"#000000|
|00000280| 22 20 6c 69 6e 6b 3d 22 | 23 39 39 34 34 45 45 22 |" link="|#9944EE"|
|00000290| 20 76 6c 69 6e 6b 3d 22 | 23 30 30 30 30 66 66 22 | vlink="|#0000ff"|
|000002a0| 20 61 6c 69 6e 6b 3d 22 | 23 30 30 66 66 30 30 22 | alink="|#00ff00"|
|000002b0| 3e 0a 0a 3c 48 32 3e 3c | 41 20 49 44 3d 22 53 45 |>..<H2><|A ID="SE|
|000002c0| 43 54 49 4f 4e 30 30 30 | 38 31 30 30 30 30 30 30 |CTION000|81000000|
|000002d0| 30 30 30 30 30 30 30 30 | 30 22 3e 0a 57 69 64 67 |00000000|0">.Widg|
|000002e0| 65 74 20 63 6f 6d 70 69 | 6c 61 74 69 6f 6e 3c 2f |et compi|lation</|
|000002f0| 41 3e 0a 3c 2f 48 32 3e | 0a 0a 3c 50 3e 0a 41 64 |A>.</H2>|..<P>.Ad|
|00000300| 64 69 6e 67 20 61 20 6e | 65 77 20 54 6b 20 77 69 |ding a n|ew Tk wi|
|00000310| 64 67 65 74 20 74 6f 20 | 74 68 65 20 20 69 6e 74 |dget to |the int|
|00000320| 65 72 70 72 65 74 65 72 | 20 69 73 20 67 65 6e 65 |erpreter| is gene|
|00000330| 72 61 6c 6c 79 20 61 20 | 73 69 6d 70 6c 65 0a 3c |rally a |simple.<|
|00000340| 45 4d 3e 68 61 63 6b 3c | 2f 45 4d 3e 2e 20 4d 6f |EM>hack<|/EM>. Mo|
|00000350| 73 74 20 6f 66 20 74 68 | 65 20 74 69 6d 65 2c 20 |st of th|e time, |
|00000360| 65 78 74 65 6e 73 69 6f | 6e 20 77 69 64 67 65 74 |extensio|n widget|
|00000370| 73 20 77 72 69 74 74 65 | 6e 0a 66 6f 72 20 54 63 |s writte|n.for Tc|
|00000380| 6c 2f 54 6b 20 63 61 6e | 20 62 65 20 61 64 64 65 |l/Tk can| be adde|
|00000390| 64 20 74 6f 20 74 68 65 | 20 20 69 6e 74 65 72 70 |d to the| interp|
|000003a0| 72 65 74 65 72 20 77 69 | 74 68 6f 75 74 20 6d 6f |reter wi|thout mo|
|000003b0| 64 69 66 79 69 6e 67 0a | 74 68 65 20 73 6f 75 72 |difying.|the sour|
|000003c0| 63 65 20 63 6f 64 65 20 | 6f 66 20 74 68 65 20 77 |ce code |of the w|
|000003d0| 69 64 67 65 74 2e 20 48 | 6f 77 65 76 65 72 2c 20 |idget. H|owever, |
|000003e0| 74 68 65 72 65 20 69 73 | 20 6e 6f 20 75 6e 69 71 |there is| no uniq|
|000003f0| 75 65 20 6d 65 74 68 6f | 64 20 74 6f 0a 61 64 64 |ue metho|d to.add|
|00000400| 20 61 20 77 69 64 67 65 | 74 20 74 6f 20 74 68 65 | a widge|t to the|
|00000410| 20 54 63 6c 20 69 6e 74 | 65 72 70 72 65 74 65 72 | Tcl int|erpreter|
|00000420| 3b 20 63 6f 6e 73 65 71 | 75 65 6e 74 6c 79 2c 20 |; conseq|uently, |
|00000430| 77 68 61 74 20 69 73 20 | 67 69 76 65 6e 20 62 65 |what is |given be|
|00000440| 6c 6f 77 0a 69 73 20 61 | 20 73 65 74 20 6f 66 20 |low.is a| set of |
|00000450| 68 69 6e 74 73 20 74 6f | 20 77 69 64 67 65 74 20 |hints to| widget |
|00000460| 69 6e 74 65 67 72 61 74 | 69 6f 6e 20 72 61 74 68 |integrat|ion rath|
|00000470| 65 72 20 74 68 61 6e 20 | 61 20 3c 45 4d 3e 61 6c |er than |a <EM>al|
|00000480| 77 61 79 73 0a 77 6f 72 | 6b 69 6e 67 20 72 65 63 |ways.wor|king rec|
|00000490| 69 70 65 3c 2f 45 4d 3e | 2e 20 54 6f 20 69 6c 6c |ipe</EM>|. To ill|
|000004a0| 75 73 74 72 61 74 65 20 | 74 68 69 73 20 73 65 63 |ustrate |this sec|
|000004b0| 74 69 6f 6e 2c 20 77 65 | 20 77 69 6c 6c 20 73 65 |tion, we| will se|
|000004c0| 65 20 68 6f 77 20 77 65 | 20 63 61 6e 20 61 64 64 |e how we| can add|
|000004d0| 0a 74 68 65 20 3c 45 4d | 3e 66 73 63 61 6c 65 3c |.the <EM|>fscale<|
|000004e0| 2f 45 4d 3e 20 77 69 64 | 67 65 74 20 28 61 20 66 |/EM> wid|get (a f|
|000004f0| 6c 6f 61 74 69 6e 67 2d | 70 6f 69 6e 74 20 73 63 |loating-|point sc|
|00000500| 61 6c 65 20 77 69 64 67 | 65 74 20 61 76 61 69 6c |ale widg|et avail|
|00000510| 61 62 6c 65 20 6f 6e 20 | 74 68 65 0a 54 63 6c 2f |able on |the.Tcl/|
|00000520| 54 6b 20 72 65 70 6f 73 | 69 74 6f 72 79 20 69 6e |Tk repos|itory in|
|00000530| 20 74 68 65 20 3c 54 54 | 3e 74 6b 46 53 63 61 6c | the <TT|>tkFScal|
|00000540| 65 2d 3f 2e 3f 2e 74 61 | 72 2e 67 7a 3c 2f 54 54 |e-?.?.ta|r.gz</TT|
|00000550| 3e 20 66 69 6c 65 29 3c | 41 20 4e 41 4d 45 3d 22 |> file)<|A NAME="|
|00000560| 74 65 78 32 68 74 6d 6c | 36 22 20 48 52 45 46 3d |tex2html|6" HREF=|
|00000570| 22 66 6f 6f 74 6e 6f 64 | 65 5f 6d 6e 2e 68 74 6d |"footnod|e_mn.htm|
|00000580| 6c 23 66 6f 6f 74 35 33 | 32 22 20 54 41 52 47 45 |l#foot53|2" TARGE|
|00000590| 54 3d 22 66 6f 6f 74 65 | 72 22 3e 3c 53 55 50 3e |T="foote|r"><SUP>|
|000005a0| 32 3c 2f 53 55 50 3e 3c | 2f 41 3e 2e 0a 0a 3c 50 |2</SUP><|/A>...<P|
|000005b0| 3e 0a 47 65 6e 65 72 61 | 6c 6c 79 2c 20 74 68 65 |>.Genera|lly, the|
|000005c0| 20 63 6f 64 65 20 6f 66 | 20 61 20 54 63 6c 2f 54 | code of| a Tcl/T|
|000005d0| 6b 20 65 78 74 65 6e 73 | 69 6f 6e 20 77 69 64 67 |k extens|ion widg|
|000005e0| 65 74 20 63 61 6e 20 62 | 65 20 64 69 76 69 64 65 |et can b|e divide|
|000005f0| 64 20 69 6e 20 74 77 6f | 0a 70 61 72 74 73 3a 20 |d in two|.parts: |
|00000600| 74 68 65 20 63 6f 64 65 | 20 77 68 69 63 68 20 69 |the code| which i|
|00000610| 6d 70 6c 65 6d 65 6e 74 | 20 77 69 64 67 65 74 27 |mplement| widget'|
|00000620| 73 20 62 65 68 61 76 69 | 6f 72 20 61 6e 64 20 74 |s behavi|or and t|
|00000630| 68 65 20 65 78 74 65 6e | 73 69 6f 6e 0a 69 6e 69 |he exten|sion.ini|
|00000640| 74 69 61 6c 69 7a 61 74 | 69 6f 6e 20 63 6f 64 65 |tializat|ion code|
|00000650| 2e 20 45 78 74 65 6e 73 | 69 6f 6e 20 69 6e 69 74 |. Extens|ion init|
|00000660| 69 61 6c 69 7a 61 74 69 | 6f 6e 20 63 6f 64 65 2c |ializati|on code,|
|00000670| 20 69 6e 20 54 63 6c 2f | 54 6b 2c 20 6d 75 73 74 | in Tcl/|Tk, must|
|00000680| 20 62 65 0a 70 6c 61 63 | 65 64 20 69 6e 20 74 68 | be.plac|ed in th|
|00000690| 65 20 70 72 6f 63 65 64 | 75 72 65 20 3c 54 54 3e |e proced|ure <TT>|
|000006a0| 54 63 6c 5f 41 70 70 49 | 6e 69 74 3c 2f 54 54 3e |Tcl_AppI|nit</TT>|
|000006b0| 20 77 68 69 63 68 20 69 | 73 20 6c 6f 63 61 74 65 | which i|s locate|
|000006c0| 64 20 69 6e 20 74 68 65 | 20 66 69 6c 65 0a 3c 54 |d in the| file.<T|
|000006d0| 54 3e 74 6b 41 70 70 49 | 6e 69 74 2e 63 3c 2f 54 |T>tkAppI|nit.c</T|
|000006e0| 54 3e 2e 20 49 66 20 74 | 68 65 20 65 78 74 65 6e |T>. If t|he exten|
|000006f0| 73 69 6f 6e 20 70 61 63 | 6b 61 67 65 20 61 64 64 |sion pac|kage add|
|00000700| 73 20 61 20 6c 6f 74 20 | 6f 66 20 77 69 64 67 65 |s a lot |of widge|
|00000710| 74 73 2c 20 69 74 0a 67 | 65 6e 65 72 61 6c 6c 79 |ts, it.g|enerally|
|00000720| 20 64 65 66 69 6e 65 73 | 20 61 20 66 75 6e 63 74 | defines| a funct|
|00000730| 69 6f 6e 20 74 6f 20 64 | 6f 20 61 6c 6c 20 74 68 |ion to d|o all th|
|00000740| 65 20 69 6e 69 74 69 61 | 6c 69 7a 61 74 69 6f 6e |e initia|lization|
|00000750| 73 2e 20 4f 6e 20 74 68 | 65 0a 6f 74 68 65 72 20 |s. On th|e.other |
|00000760| 68 61 6e 64 2c 20 69 66 | 20 74 68 65 20 65 78 74 |hand, if| the ext|
|00000770| 65 6e 73 69 6f 6e 20 6f | 6e 6c 79 20 64 65 66 69 |ension o|nly defi|
|00000780| 6e 65 73 20 61 20 73 69 | 6e 67 6c 65 20 77 69 64 |nes a si|ngle wid|
|00000790| 67 65 74 2c 20 74 68 65 | 0a 65 78 74 65 6e 73 69 |get, the|.extensi|
|000007a0| 6f 6e 20 63 6f 64 65 20 | 67 65 6e 65 72 61 6c 6c |on code |generall|
|000007b0| 79 20 63 6f 6e 73 69 73 | 74 73 20 74 6f 20 63 61 |y consis|ts to ca|
|000007c0| 6c 6c 20 74 68 65 20 43 | 20 66 75 6e 63 74 69 6f |ll the C| functio|
|000007d0| 6e 20 0a 54 63 6c 5f 43 | 72 65 61 74 65 43 6f 6d |n .Tcl_C|reateCom|
|000007e0| 6d 61 6e 64 20 66 6f 72 | 20 65 61 63 68 20 6e 65 |mand for| each ne|
|000007f0| 77 20 77 69 64 67 65 74 | 20 64 65 66 69 6e 65 64 |w widget| defined|
|00000800| 20 69 6e 20 74 68 65 0a | 65 78 74 65 6e 73 69 6f | in the.|extensio|
|00000810| 6e 2e 20 3c 54 54 3e 54 | 63 6c 5f 43 72 65 61 74 |n. <TT>T|cl_Creat|
|00000820| 65 43 6f 6d 6d 61 6e 64 | 3c 2f 54 54 3e 20 69 73 |eCommand|</TT> is|
|00000830| 20 74 68 65 20 54 63 6c | 20 73 74 61 6e 64 61 72 | the Tcl| standar|
|00000840| 64 20 77 61 79 20 74 6f | 20 61 64 64 20 61 0a 6e |d way to| add a.n|
|00000850| 65 77 20 63 6f 6d 6d 61 | 6e 64 2e 20 54 68 69 73 |ew comma|nd. This|
|00000860| 20 66 75 6e 63 74 69 6f | 6e 20 61 6c 73 6f 20 65 | functio|n also e|
|00000870| 78 69 73 74 73 20 69 6e | 20 74 68 65 20 20 69 6e |xists in| the in|
|00000880| 74 65 72 70 72 65 74 65 | 72 3b 20 69 74 0a 63 72 |terprete|r; it.cr|
|00000890| 65 61 74 65 73 20 61 20 | 6e 65 77 20 54 6b 20 63 |eates a |new Tk c|
|000008a0| 6f 6d 6d 61 6e 64 20 6f | 62 6a 65 63 74 26 6e 62 |ommand o|bject&nb|
|000008b0| 73 70 3b 5b 23 21 47 61 | 6c 6c 65 73 69 6f 39 35 |sp;[#!Ga|llesio95|
|000008c0| 2d 31 21 23 5d 2e 20 54 | 68 65 0a 70 72 6f 74 6f |-1!#]. T|he.proto|
|000008d0| 74 79 70 65 20 6f 66 20 | 74 68 69 73 20 66 75 6e |type of |this fun|
|000008e0| 63 74 69 6f 6e 20 69 73 | 3a 0a 3c 42 52 3e 0a 3c |ction is|:.<BR>.<|
|000008f0| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 22 20 53 |IMG. ST|YLE="" S|
|00000900| 52 43 3d 22 69 6d 67 33 | 31 2e 70 6e 67 22 0a 20 |RC="img3|1.png". |
|00000910| 41 4c 54 3d 22 5c 62 65 | 67 69 6e 7b 43 6f 64 65 |ALT="\be|gin{Code|
|00000920| 7d 0a 5c 62 65 67 69 6e | 7b 6c 69 73 74 69 6e 67 |}.\begin|{listing|
|00000930| 7d 5b 32 30 30 5d 7b 32 | 7d 0a 76 6f 69 64 20 54 |}[200]{2|}.void T|
|00000940| 63 6c 5f 43 72 65 61 74 | 65 43 6f 6d 6d 61 6e 64 |cl_Creat|eCommand|
|00000950| 28 54 63 6c 5f 49 6e 74 | 65 72 70 20 2a 69 6e 74 |(Tcl_Int|erp *int|
|00000960| 65 72 70 2c 0a 2e 2e 2e | 0a 2e 2e 2e 43 6c 69 65 |erp,....|....Clie|
|00000970| 6e 74 44 61 74 61 20 63 | 6c 69 65 6e 74 44 61 74 |ntData c|lientDat|
|00000980| 61 2c 0a 54 63 6c 5f 43 | 6d 64 44 65 6c 65 74 65 |a,.Tcl_C|mdDelete|
|00000990| 50 72 6f 63 20 2a 64 65 | 6c 65 74 65 50 72 6f 63 |Proc *de|leteProc|
|000009a0| 29 29 3b 0a 5c 65 6e 64 | 7b 6c 69 73 74 69 6e 67 |));.\end|{listing|
|000009b0| 7d 5c 65 6e 64 7b 43 6f | 64 65 7d 22 3e 0a 3c 42 |}\end{Co|de}">.<B|
|000009c0| 52 3e 0a 0a 3c 50 3e 0a | 46 6f 72 20 2c 0a 0a 3c |R>..<P>.|For ,..<|
|000009d0| 55 4c 3e 0a 3c 4c 49 3e | 74 68 65 20 3c 54 54 3e |UL>.<LI>|the <TT>|
|000009e0| 69 6e 74 65 72 70 3c 2f | 54 54 3e 20 69 73 20 61 |interp</|TT> is a|
|000009f0| 6c 77 61 79 73 20 74 68 | 65 20 67 6c 6f 62 61 6c |lways th|e global|
|00000a00| 20 76 61 72 69 61 62 6c | 65 0a 20 20 20 20 20 20 | variabl|e. |
|00000a10| 20 20 20 20 20 20 20 20 | 20 20 53 74 6b 5f 6d 61 | | Stk_ma|
|00000a20| 69 6e 5f 69 6e 74 65 72 | 70 0a 3c 2f 4c 49 3e 0a |in_inter|p.</LI>.|
|00000a30| 3c 4c 49 3e 3c 54 54 3e | 63 6d 64 4e 61 6d 65 3c |<LI><TT>|cmdName<|
|00000a40| 2f 54 54 3e 20 69 73 20 | 74 68 65 20 6e 61 6d 65 |/TT> is |the name|
|00000a50| 20 6f 66 20 74 68 65 20 | 77 69 64 67 65 74 20 69 | of the |widget i|
|00000a60| 6e 20 74 68 65 20 53 63 | 68 65 6d 65 20 77 6f 72 |n the Sc|heme wor|
|00000a70| 6c 64 2e 0a 3c 2f 4c 49 | 3e 0a 3c 4c 49 3e 3c 54 |ld..</LI|>.<LI><T|
|00000a80| 54 3e 70 72 6f 63 3c 2f | 54 54 3e 20 69 73 20 74 |T>proc</|TT> is t|
|00000a90| 68 65 20 6e 61 6d 65 20 | 6f 66 20 74 68 65 20 43 |he name |of the C|
|00000aa0| 20 66 75 6e 63 74 69 6f | 6e 20 77 68 69 63 68 20 | functio|n which |
|00000ab0| 69 6d 70 6c 65 6d 65 6e | 74 20 74 68 65 20 3c 45 |implemen|t the <E|
|00000ac0| 4d 3e 54 6b 20 63 6f 6d | 6d 61 6e 64 3c 2f 45 4d |M>Tk com|mand</EM|
|00000ad0| 3e 0a 3c 2f 4c 49 3e 0a | 3c 4c 49 3e 3c 54 54 3e |>.</LI>.|<LI><TT>|
|00000ae0| 63 6c 69 65 6e 74 44 61 | 74 61 3c 2f 54 54 3e 20 |clientDa|ta</TT> |
|00000af0| 61 72 65 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 73 |are info|rmations|
|00000b00| 20 77 68 69 63 68 20 61 | 72 65 20 61 73 73 6f 63 | which a|re assoc|
|00000b10| 69 61 74 65 64 20 74 6f | 20 74 68 65 0a 77 69 64 |iated to| the.wid|
|00000b20| 67 65 74 20 63 6f 64 65 | 2e 20 46 6f 72 20 61 20 |get code|. For a |
|00000b30| 6e 65 77 20 77 69 64 67 | 65 74 2c 20 3c 54 54 3e |new widg|et, <TT>|
|00000b40| 63 6c 69 65 6e 74 44 61 | 74 61 3c 2f 54 54 3e 20 |clientDa|ta</TT> |
|00000b50| 63 61 6e 20 67 65 6e 65 | 72 61 6c 6c 79 20 73 65 |can gene|rally se|
|00000b60| 74 20 74 6f 20 0a 74 68 | 65 20 72 65 73 75 6c 74 |t to .th|e result|
|00000b70| 20 6f 66 20 0a 3c 42 52 | 3e 0a 3c 49 4d 47 0a 20 | of .<BR|>.<IMG. |
|00000b80| 20 53 54 59 4c 45 3d 22 | 22 20 53 52 43 3d 22 69 | STYLE="|" SRC="i|
|00000b90| 6d 67 33 32 2e 70 6e 67 | 22 0a 20 41 4c 54 3d 22 |mg32.png|". ALT="|
|00000ba0| 5c 62 65 67 69 6e 7b 43 | 6f 64 65 7d 0a 5c 62 65 |\begin{C|ode}.\be|
|00000bb0| 67 69 6e 7b 6c 69 73 74 | 69 6e 67 7d 5b 32 30 30 |gin{list|ing}[200|
|00000bc0| 5d 7b 32 7d 0a 54 6b 5f | 4d 61 69 6e 57 69 6e 64 |]{2}.Tk_|MainWind|
|00000bd0| 6f 77 28 53 74 6b 5f 6d | 61 69 6e 5f 69 6e 74 65 |ow(Stk_m|ain_inte|
|00000be0| 72 70 29 3b 0a 5c 65 6e | 64 7b 6c 69 73 74 69 6e |rp);.\en|d{listin|
|00000bf0| 67 7d 5c 65 6e 64 7b 43 | 6f 64 65 7d 22 3e 0a 3c |g}\end{C|ode}">.<|
|00000c00| 42 52 3e 0a 3c 2f 4c 49 | 3e 0a 3c 4c 49 3e 3c 54 |BR>.</LI|>.<LI><T|
|00000c10| 54 3e 64 65 6c 65 74 65 | 50 72 6f 63 3c 2f 54 54 |T>delete|Proc</TT|
|00000c20| 3e 20 69 73 20 61 20 66 | 75 6e 63 74 69 6f 6e 20 |> is a f|unction |
|00000c30| 77 68 69 63 68 20 69 73 | 20 63 61 6c 6c 65 64 20 |which is| called |
|00000c40| 77 68 65 6e 20 74 68 65 | 20 77 69 64 67 65 74 0a |when the| widget.|
|00000c50| 69 73 20 64 65 73 74 72 | 6f 79 65 64 2e 20 59 6f |is destr|oyed. Yo|
|00000c60| 75 20 67 65 6e 65 72 61 | 6c 6c 79 20 64 6f 6e 27 |u genera|lly don'|
|00000c70| 74 20 6e 65 65 64 20 74 | 6f 20 63 68 61 6e 67 65 |t need t|o change|
|00000c80| 20 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 74 68 | the val|ue of th|
|00000c90| 69 73 0a 70 61 72 61 6d | 65 74 65 72 20 28 77 68 |is.param|eter (wh|
|00000ca0| 69 63 68 20 69 73 20 6f | 66 74 65 6e 20 73 65 74 |ich is o|ften set|
|00000cb0| 20 74 6f 20 3c 54 54 3e | 4e 55 4c 4c 3c 2f 54 54 | to <TT>|NULL</TT|
|00000cc0| 3e 29 2e 20 0a 3c 2f 4c | 49 3e 0a 3c 2f 55 4c 3e |>). .</L|I>.</UL>|
|00000cd0| 0a 0a 3c 50 3e 0a 54 68 | 65 20 75 73 75 61 6c 20 |..<P>.Th|e usual |
|00000ce0| 77 61 79 20 74 6f 20 69 | 6e 74 65 67 72 61 74 65 |way to i|ntegrate|
|00000cf0| 20 74 68 69 73 20 69 6e | 69 74 69 61 6c 69 7a 61 | this in|itializa|
|00000d00| 74 69 6f 6e 20 63 6f 64 | 65 20 69 6e 20 61 20 54 |tion cod|e in a T|
|00000d10| 63 6c 20 69 6e 74 65 72 | 70 72 65 74 65 72 0a 63 |cl inter|preter.c|
|00000d20| 6f 6e 73 69 73 74 73 20 | 74 6f 20 70 61 74 63 68 |onsists |to patch|
|00000d30| 20 74 68 65 20 3c 54 54 | 3e 74 6b 41 70 70 49 6e | the <TT|>tkAppIn|
|00000d40| 69 74 2e 63 3c 2f 54 54 | 3e 20 66 69 6c 65 20 74 |it.c</TT|> file t|
|00000d50| 6f 20 61 64 64 20 74 68 | 65 20 63 61 6c 6c 20 74 |o add th|e call t|
|00000d60| 6f 20 74 68 65 0a 69 6e | 69 74 69 61 6c 69 7a 61 |o the.in|itializa|
|00000d70| 74 69 6f 6e 20 28 6f 72 | 20 74 68 65 20 3c 54 54 |tion (or| the <TT|
|00000d80| 3e 54 63 6c 5f 43 72 65 | 61 74 65 43 6f 6d 6d 61 |>Tcl_Cre|ateComma|
|00000d90| 6e 64 3c 2f 54 54 3e 29 | 20 66 75 6e 63 74 69 6f |nd</TT>)| functio|
|00000da0| 6e 2e 0a 54 6f 20 61 64 | 64 20 61 6e 20 65 78 74 |n..To ad|d an ext|
|00000db0| 65 6e 73 69 6f 6e 20 77 | 72 69 74 74 65 6e 20 66 |ension w|ritten f|
|00000dc0| 6f 72 20 54 63 6c 2f 54 | 6b 20 74 6f 20 2c 20 61 |or Tcl/T|k to , a|
|00000dd0| 6c 6c 20 74 68 61 74 20 | 69 73 20 6e 65 65 64 65 |ll that |is neede|
|00000de0| 64 0a 63 6f 6e 73 69 73 | 74 73 20 74 6f 20 61 64 |d.consis|ts to ad|
|00000df0| 61 70 74 20 74 68 65 20 | 69 6e 69 74 69 61 6c 69 |apt the |initiali|
|00000e00| 7a 61 74 69 6f 6e 20 63 | 6f 64 65 20 66 6f 72 20 |zation c|ode for |
|00000e10| 2e 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 74 |. For ex|ample, t|
|00000e20| 68 65 0a 3c 54 54 3e 66 | 73 63 61 6c 65 3c 2f 54 |he.<TT>f|scale</T|
|00000e30| 54 3e 20 77 69 64 67 65 | 74 20 69 6e 69 74 69 61 |T> widge|t initia|
|00000e40| 6c 69 7a 61 74 69 6f 6e | 20 63 6f 64 65 20 61 64 |lization| code ad|
|00000e50| 64 73 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ds the f|ollowing|
|00000e60| 20 63 61 6c 6c 20 69 6e | 20 74 68 65 0a 62 6f 64 | call in| the.bod|
|00000e70| 79 20 6f 66 20 74 68 65 | 20 3c 54 54 3e 54 63 6c |y of the| <TT>Tcl|
|00000e80| 5f 41 70 70 49 6e 69 74 | 3c 2f 54 54 3e 20 66 75 |_AppInit|</TT> fu|
|00000e90| 6e 63 74 69 6f 6e 3a 0a | 3c 42 52 3e 0a 3c 49 4d |nction:.|<BR>.<IM|
|00000ea0| 47 0a 20 20 53 54 59 4c | 45 3d 22 22 20 53 52 43 |G. STYL|E="" SRC|
|00000eb0| 3d 22 69 6d 67 33 33 2e | 70 6e 67 22 0a 20 41 4c |="img33.|png". AL|
|00000ec0| 54 3d 22 5c 62 65 67 69 | 6e 7b 43 6f 64 65 7d 0a |T="\begi|n{Code}.|
|00000ed0| 5c 62 65 67 69 6e 7b 6c | 69 73 74 69 6e 67 7d 5b |\begin{l|isting}[|
|00000ee0| 32 30 30 5d 7b 32 7d 0a | 54 63 6c 5f 43 72 65 61 |200]{2}.|Tcl_Crea|
|00000ef0| 74 65 43 6f 6d 6d 61 6e | 64 28 69 6e 74 65 72 70 |teComman|d(interp|
|00000f00| 2c 20 27 27 66 73 63 61 | 6c 65 27 27 2c 20 54 6b |, ''fsca|le'', Tk|
|00000f10| 5f 46 53 63 61 6c 65 43 | 6d 64 2c 0a 28 43 6c 69 |_FScaleC|md,.(Cli|
|00000f20| 65 6e 74 44 61 74 61 29 | 20 6d 61 69 6e 2c 0a 28 |entData)| main,.(|
|00000f30| 76 6f 69 64 20 28 2a 29 | 28 29 29 20 4e 55 4c 4c |void (*)|()) NULL|
|00000f40| 29 3b 0a 5c 65 6e 64 7b | 6c 69 73 74 69 6e 67 7d |);.\end{|listing}|
|00000f50| 5c 65 6e 64 7b 43 6f 64 | 65 7d 22 3e 0a 3c 42 52 |\end{Cod|e}">.<BR|
|00000f60| 3e 0a 0a 3c 50 3e 0a 46 | 6f 72 20 2c 20 74 68 69 |>..<P>.F|or , thi|
|00000f70| 73 20 63 61 6c 6c 20 63 | 61 6e 20 62 65 20 77 72 |s call c|an be wr|
|00000f80| 69 74 74 65 6e 20 0a 3c | 42 52 3e 0a 3c 49 4d 47 |itten .<|BR>.<IMG|
|00000f90| 0a 20 20 53 54 59 4c 45 | 3d 22 22 20 53 52 43 3d |. STYLE|="" SRC=|
|00000fa0| 22 69 6d 67 33 34 2e 70 | 6e 67 22 0a 20 41 4c 54 |"img34.p|ng". ALT|
|00000fb0| 3d 22 5c 62 65 67 69 6e | 7b 43 6f 64 65 7d 0a 5c |="\begin|{Code}.\|
|00000fc0| 62 65 67 69 6e 7b 6c 69 | 73 74 69 6e 67 7d 5b 32 |begin{li|sting}[2|
|00000fd0| 30 30 5d 7b 32 7d 0a 54 | 63 6c 5f 43 72 65 61 74 |00]{2}.T|cl_Creat|
|00000fe0| 65 43 6f 6d 6d 61 6e 64 | 28 53 54 6b 5f 6d 61 69 |eCommand|(STk_mai|
|00000ff0| 6e 5f 69 6e 74 65 72 70 | 2c 20 27 27 66 73 63 61 |n_interp|, ''fsca|
|00001000| 6c 65 2e 2e 2e 0a 2e 2e | 2e 61 29 20 54 6b 5f 4d |le......|.a) Tk_M|
|00001010| 61 69 6e 57 69 6e 64 6f | 77 28 53 54 6b 5f 6d 61 |ainWindo|w(STk_ma|
|00001020| 69 6e 5f 69 6e 74 65 72 | 70 29 2c 0a 28 76 6f 69 |in_inter|p),.(voi|
|00001030| 64 20 28 2a 29 28 29 29 | 20 4e 55 4c 4c 29 3b 0a |d (*)())| NULL);.|
|00001040| 5c 65 6e 64 7b 6c 69 73 | 74 69 6e 67 7d 5c 65 6e |\end{lis|ting}\en|
|00001050| 64 7b 43 6f 64 65 7d 22 | 3e 0a 3c 42 52 3e 0a 0a |d{Code}"|>.<BR>..|
|00001060| 3c 50 3e 0a 54 68 69 73 | 20 63 61 6c 6c 20 6d 75 |<P>.This| call mu|
|00001070| 73 74 20 65 78 65 63 75 | 74 65 64 20 62 65 66 6f |st execu|ted befo|
|00001080| 72 65 20 74 72 79 69 6e | 67 20 74 6f 20 63 72 65 |re tryin|g to cre|
|00001090| 61 74 65 20 61 20 6e 65 | 77 20 3c 54 54 3e 66 73 |ate a ne|w <TT>fs|
|000010a0| 63 61 6c 65 3c 2f 54 54 | 3e 0a 77 69 64 67 65 74 |cale</TT|>.widget|
|000010b0| 2e 0a 0a 3c 50 3e 0a 0a | 3c 48 52 3e 0a 0a 3c 2f |...<P>..|<HR>..</|
|000010c0| 42 4f 44 59 3e 0a 3c 2f | 48 54 4d 4c 3e 0a |BODY>.</|HTML>. |
+--------+-------------------------+-------------------------+--------+--------+