home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / incoming / jstools-.6v3 / jstools- / jstools-tk3.6v3.0 / lib / jdoc / jconfirm.tcl.jdoc < prev    next >
Encoding:
Text File  |  1995-03-14  |  7.2 KB  |  1 lines

  1. jconfirm.tcl\n\nIntroduction\nThe\ jconfirm.tcl\ library\ is\ distributed\ as\ part\ of\ the\ jstools\ package.\ \ It\ consists\ of\ a\ single\ procedure\ which\ provides\ a\ panel\ designed\ to\ ask\ the\ user\ to\ confirm\ an\ action,\ but\ which\ can\ be\ generalised\ to\ other\ sorts\ of\ yes¡or¡no\ questions.\n\nThis\ document\ describes\ jconfirm.tcl\ version\ 3.6/3.0.\n\nUsage\nAccessing\ the\ Library\nIn\ order\ to\ use\ the\ jconfirm.tcl\ library,\ it\ (and\ any\ other\ libraries\ it\ depends\ on)\ must\ be\ in\ your\ Tcl\ auto_path,\ described\ in\ tclvars(n).\ \ Information\ about\ how\ to\ arrange\ that,\ and\ other\ conventions\ common\ to\ the\ jstools\ libraries,\ is\ in\ the\ Usage\ section\ of\ The\ jstools\ Libraries.\n\nCredits\ and\ Copyright\nAuthor\nJay\ Sekora\ \njs@bu.edu\nhttp://shore.net/~js/\n\nCopyright\nThe\ library\ is\ copyright\ ⌐\ 1992-1994\ by\ Jay\ Sekora,\ but\ may\ be\ freely\ copied\ and\ modified\ for\ non¡commercial\ purposes.\ \ (Please\ contact\ me\ if\ you\ want\ to\ use\ it\ for\ a\ commercial\ purpose,\ this\ may\ be\ OK\ under\ some\ circumstances.)\n\nOverview\nProcedure\nj:confirm\ -\ present\ a\ Cancel/OK\ dialogue\ box\n\nj:confirm\nUsage\n\tj:confirm\ \[options\]\nOptions\n\t-title\ title\ \ (default\ Confirm)\n\t-text\ text\ \ (default\ Are\ you\ sure?)\n\t-priority\ priority\ \ (default\ 0)\n\t-yesbutton\ ok\ \ (default\ OK)\n\t-nobutton\ cancel\ \ (default\ Cancel)\n\nExamples\n\tif\ \[j:confirm\ -text\ \"Are\ you\ sure\ you\ want\ to\ quit?\"\]\ {\n\t\ \ exit\ 0\n\t}\n\t\n\tif\ \[j:confirm\ \\\n\t\ \ \ \ -priority\ 100\ \\\n\t\ \ \ \ -text\ \"Really\ create\ a\ new\ filesystem\ on\ \$dev?\"\]\ {\n\t\ \ exec\ mkfs\ \$dev\n\t}\n\t\nDescription\nThis\ procedure\ lets\ you\ ask\ yes/no\ questions.\ \ It\ creates\ a\ dialogue\ box\ with\ the\ message\ text\ and\ two\ buttons\ labelled\ ok\ and\ cancel.\ \ It\ returns\ 1\ (true)\ if\ the\ user\ clicks\ the\ button\ marked\ ok,\ and\ 0\ (false)\ if\ the\ user\ clicks\ the\ button\ marked\ cancel.\ \ Thus\ it\ can\ conveniently\ be\ used\ in\ if\ statements.\n\nThe\ -priority\ option\ and\ the\ global\ variable\ J_PREFS(confirm)\ interact\ to\ determine\ whether\ the\ panel\ will\ be\ displayed\ at\ all.\ \ If\ J_PREFS(confirm)\ is\ false,\ and\ priority\ is\ 0\ (the\ default),\ the\ procedure\ will\ return\ 1\ immediately,\ without\ displaying\ the\ panel.\ \ You\ should\ leave\ priority\ 0\ when\ you\ simply\ want\ to\ confirm\ an\ action\ the\ user\ has\ requested.\ \ In\ combination\ with\ the\ jstools\ preferences\ mechanism\ and\ j:global_pref_panel,\ this\ lets\ experienced\ or\ adventuresome\ users\ turn\ off\ such\ confirmation.\ \ When\ you\ have\ a\ question\ that\ represents\ a\ real\ choice,\ rather\ than\ just\ a\ confirmation\ -\ or\ you\ really,\ really\ want\ to\ make\ sure\ the\ user\ confirms\ the\ action\ -\ you\ should\ specify\ a\ non¡zero\ priority.\ \ (Depending\ on\ the\ question,\ you\ may\ also\ want\ to\ specify\ non¡default\ labels\ for\ the\ buttons.)\ \ In\ the\ future,\ I\ expect\ to\ let\ users\ choose\ a\ threshold\ priority\ value\ between\ 1\ and\ 100\ to\ determine\ whether\ a\ particular\ confirmation\ panel\ is\ displayed,\ so\ you\ should\ use\ 100\ for\ any\ confirmation\ panel\ that\ absolutely\ must\ be\ displayed.\n\nIf\ title\ is\ specified,\ it\ will\ be\ the\ title\ of\ the\ panel,\ for\ use\ by\ the\ window\ manager.\n\nEvolution\nFeel\ free\ to\ report\ bugs\ (and\ feature\ requests)\ to\ me,\ <js@bu.edu>,\ and\ I\ will\ try\ to\ deal\ with\ them.\ \ Also,\ feel\ free\ to\ fix\ bugs\ or\ add\ features\ on\ your\ own\ and\ let\ me\ know\ how\ you\ did\ it.\n\nBugs\ and\ Limitations\nThe\ priority\ mechanism\ is\ insufficiently\ general.\n\nThere\ are\ lots\ of\ cases\ where\ it\ makes\ sense\ to\ guard\ in\ some\ way\ against\ stray\ mouse\ clicks\ or\ accidental\ keypresses,\ but\ where\ bringing\ up\ a\ new\ toplevel\ panelis\ overkill.\n\nChanges\nThe\ j:confirm\ procedure\ used\ to\ be\ in\ a\ file\ called\ jlibrary.tcl.\ \ Starting\ with\ version\ 3.6/3.0,\ it's\ in\ its\ own\ independent\ library.\n\nFuture\ Directions\nThe\ user\ should\ be\ able\ to\ specify\ how\ important\ a\ confirmation\ panel\ needs\ to\ be\ in\ order\ actually\ to\ be\ displayed.\ \ (Perhaps\ there\ should\ be\ several\ scales\ -\ for\ instance,\ one\ for\ how\ dangerous\ an\ action\ is,\ one\ for\ how\ unusual\ an\ action\ is,\ etc.)\n {{{jdoc:xref:link {4.55 4.62 10.213 10.234 10.242 10.259 10.263 10.284 23.0 23.9 49.383 49.390 49.417 49.436}} {jdoc:xref:manpage {10.129 10.136}} {jdoc:anchor:anchorname {3.0 4.0 8.0 9.0 12.0 13.0 25.0 26.0 53.0 54.0}} {richtext:font:roman {2.0 3.0 4.0 4.4 4.16 4.55 4.62 6.24 6.36 8.0 10.0 10.20 10.32 10.105 10.114 10.129 10.136 10.217 10.224 10.246 10.251 10.263 10.284 12.0 14.0 15.0 15.9 16.0 16.21 18.0 19.0 21.0 22.9 23.0 23.9 25.0 27.11 27.12 27.19 28.0 29.15 29.24 29.31 30.0 30.13 30.22 30.35 31.0 31.21 31.30 31.31 32.0 32.16 32.25 32.27 33.0 33.19 33.28 33.34 33.35 34.0 35.0 45.0 46.0 47.0 47.90 47.94 47.120 47.122 47.127 47.133 47.147 47.148 47.193 47.195 47.201 47.202 47.248 47.254 47.293 47.295 49.4 49.13 49.45 49.61 49.132 49.148 49.163 49.171 49.175 49.176 49.218 49.219 49.281 49.289 49.290 49.291 49.383 49.390 49.417 49.436 49.703 49.711 49.888 49.889 49.894 49.897 49.983 49.986 51.3 51.8 53.0 53.9 54.55 54.66 56.0 56.20 61.0 61.7 62.4 62.13 62.52 62.64 64.0 64.17 66.0}} {richtext:font:italic {27.12 27.19 29.8 29.13 30.7 30.11 31.11 31.19 32.12 32.14 33.11 33.17 47.90 47.94 47.120 47.122 47.127 47.133 47.193 47.195 47.248 47.254 49.163 49.171 49.281 49.289 49.703 49.711 51.3 51.8}} {richtext:font:bold {4.4 4.16 4.55 4.62 6.24 6.36 10.20 10.32 10.217 10.224 49.383 49.390 62.52 62.64}} {richtext:font:bolditalic {10.246 10.251 10.263 10.284}} {richtext:font:typewriter {10.105 10.114 10.129 10.136 15.0 15.9 16.0 16.21 23.0 23.9 27.0 27.11 29.0 29.8 29.13 29.15 29.24 29.31 30.0 30.7 30.11 30.13 30.22 30.35 31.0 31.11 31.19 31.21 31.30 31.31 32.0 32.12 32.14 32.16 32.25 32.27 33.0 33.11 33.17 33.19 33.28 33.34 33.35 34.0 36.0 45.0 47.147 47.148 47.201 47.202 47.293 47.295 49.4 49.13 49.45 49.61 49.132 49.148 49.175 49.176 49.218 49.219 49.290 49.291 49.417 49.436 49.888 49.889 49.894 49.897 49.983 49.986 54.55 54.66 62.4 62.13}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {3.0 4.0 8.0 9.0 12.0 13.0 21.0 22.0 25.0 26.0 53.0 53.9}} {richtext:font:heading2 {9.0 10.0 13.0 14.0 18.0 19.0 22.0 22.9 26.0 27.0 28.0 29.0 35.0 36.0 46.0 47.0 56.0 56.20 61.0 61.7 64.0 64.17}} {{} {12.0 20.0 22.0 22.9 25.0 25.2 25.9 27.3 27.10 29.24 29.31 30.22 30.35 31.0 34.0 35.0 63.0 64.0}} {jdoc:link:jstools.jdoc {4.55 4.62 49.383 49.390}} {jdoc:manpage:tclvars {10.129 10.136}} {jdoc:link:jslibraries.jdoc#Usage {10.242 10.259}} {jdoc:link:jslibraries.jdoc {10.213 10.234 10.263 10.284}} {jdoc:anchorname:Evolution {53.0 54.0}} {jdoc:anchorname:Credits_and_Copyright {12.0 13.0}} {jdoc:anchorname:Introduction {3.0 4.0}} {jdoc:link:#j:confirm {23.0 23.9}} {jdoc:link:jprefpanel.tcl.jdoc#j:global_pref_panel {49.417 49.436}} {jdoc:anchorname:j:confirm {25.0 26.0}} {jdoc:anchorname:Usage {8.0 9.0}}} {{del_from 66.0} {matchend 66.0} {abbrevstart 49.391} {abbrevend 49.412} {insert 6.52} {del_to 66.0} {matchstart 66.0} {anchor 6.52} {emacs_mark 66.0} {current 1.12}}}