home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Utilities / Text Processing / Alpha / Help / Bug Reports and Debugging < prev    next >
Encoding:
Text File  |  1999-04-12  |  25.3 KB  |  618 lines  |  [TEXT/ALFA]

  1. ================================================================================
  2.  
  3.           Bugs and Bug-reports
  4.  
  5. Please send details of any problems you have with any packages or with Alpha 
  6. itself to the person responsible, or enquire on the Alpha-D mailing list.  
  7. Perhaps someone there will be able to help you out.  Serious bugs which, for 
  8. example, crash Alpha can probably only be fixed by Pete Keleher, but other 
  9. bugs may be Tcl code bugs, and can be fixed more quickly and easily.  
  10. Without a 'Stack Trace' it is ALMOST ALWAYS NOT POSSIBLE to track down 
  11. problems in Alpha's Tcl code, unless they lead to very 'visual' problems.
  12.  
  13. The help below tells you how to get a stack trace under the most 
  14. general circumstances.  One quick trick you may try is the following.  
  15. Open a Tcl shell (cmd-Y in the file menu) and then repeat the action 
  16. which caused the problem.  Some internal problems are trapped by Alpha 
  17. and errors dumped to the shell window if it's open.  If you're lucky, 
  18. your bug is trapped like that you'll have the trace to report 
  19. automatically.
  20.  
  21.            Stack-traces
  22.  
  23. It would be helpful to have a stack-trace if a command is obviously doing
  24. the wrong thing/failing with an error.  To do this, hit cmd-Y to pull up 
  25. the Tcl shell, and select 'Trace Tcl Proc…' from the menu.  Select the
  26. procedure you need to trace (or ask me which one to trace), and go back to 
  27. where you were to repeat the action which caused the problem.  Now hit 
  28. cmd-Y again, and then select 'Dump Traces' and mail me the resulting window
  29. which is opened.  
  30.  
  31. With some errors it may be worth rebuilding your Tcl indices and then 
  32. quitting and restarting Alpha (use the Tcl menu to do that).
  33.  
  34. Please include the version numbers of Alpha and other packages which you are 
  35. using.  If they are not the latest you should consider upgrading first too.
  36.  
  37. Sometimes you can get a first estimate at what went wrong by examining 
  38. the 'errorInfo' variable which Tcl sets.  If an action you perform fails, 
  39. hit 'cmd-Y' to bring up the Tcl shell, and then type 'set errorInfo' and 
  40. <return>.  The value of the errorInfo variable will be dumped into the 
  41. shell window.  It may help you to debug things.
  42.  
  43.            What procedure to trace?
  44.  
  45. If a menu-selection causes a problem, then it is pretty clear what to
  46. trace, but if it was a key-press it is less clear.
  47.         
  48. Often you won't know which procedure you should trace.  However if the 
  49. problem occurs with a key-press (say you press 'return' and the wrong thing 
  50. happens), then you can find out which procedure is being activated with the 
  51. 'Describe Binding (F7)' menu item: hit F7, followed by the offending 
  52. key-press.  Alpha will give you the name of the procedure which would be 
  53. triggered by that key.  Now setup a trace on that procedure as detailed in 
  54. the preceding paragraph.
  55.  
  56.            Using Trace-func
  57.  
  58. 5.0 introduces the Tcl function-tracing command 'traceFunc'. traceFunc 
  59. allows you to trace a specfic function whenever it is called, sending the 
  60. output to another window. The indented trace of the function includes all 
  61. parameters, each argument enclosed within single quotes, as well as the 
  62. function result. 
  63.  
  64. The syntax of the function is:
  65.  
  66.     traceFunc on <funcName> <winName>
  67.     traceFunc off
  68.     traceFunc status
  69.  
  70. For example, if I want to trace the proc 'nextFunc' (defined in 
  71. procs.tcl), the following might be a log of my activity at the Tcl shell:
  72.  
  73.     Welcome to Alpha's Tcl shell.
  74.     Alpha> traceFunc on nextFunc traceWin
  75.     Alpha> traceFunc status
  76.     Func-tracing on, func: nextFunc, win: traceWin
  77.     Alpha> 
  78.  
  79. Now I create a new window, "dirty" it so that I can get a save dialog, 
  80. and save it as 'traceWin'. Note that tracing is only sent to open 
  81. windows, so I must leave 'traceWin' open.
  82.  
  83. Then I open any random non-C file (because I want the function to fail), go 
  84. to the beginning of the file, and type escape-x 'nextFunc'.  The output 
  85. should look something like the following:
  86.  
  87.     nextFunc 
  88.      searchFunc '1' 
  89.       getPos 
  90.       OK: 38530
  91.       select '38530' 
  92.       OK: 
  93.       saveVars 
  94.       OK: 
  95.       if '(1==1)' '
  96.             nextLine
  97.         ' 'else' '
  98.             previousLine
  99.         ' 
  100.        nextLine 
  101.        OK: 
  102.       OK: 
  103.       getPos 
  104.       OK: 38573
  105.       set 'pos' '38573' 
  106.       OK: 38573
  107.       setVar 'regExpr' '1' 
  108.       OK: 
  109.       setVar 'forward' '1' 
  110.       OK: 
  111.       setVar 'ignoreCase' '1' 
  112.       OK: 
  113.       search '^[^ \t\(#\r/@].*\(.*\)$' '38573' 
  114.       ERROR: Search unsuccessful
  115.      ERROR: Search unsuccessful
  116.     ERROR: Search unsuccessful
  117.  
  118.  
  119. The trace output shows that the problem was an unsuccessful search. In 
  120. this case, a dialog informed us of this fact anyway, but many Alpha 
  121. routines are not as friendly when it comes to error messages.
  122.  
  123.  
  124. Another way to debug Tcl routines is to insert statements that print 
  125. values to another window. For example, one could use the following 
  126. routine: 
  127.  
  128.     proc out args {
  129.         insertText -w "*tcl shell*" $args
  130.     }
  131.  
  132. Whatever you do, don't use 'puts stdout' or 'puts stderr' since these
  133. tend to crash Alpha (hopefully to be fixed at some point...)
  134.  
  135. ================================================================================
  136.  
  137.            Here's some debugging advice from Tom:
  138.  
  139. Hi All,
  140.  
  141. This is so simple that I hesitate to admit that I missed it this long, but
  142. I'll swallow my pride an mention this in case anyone  else has missed this.
  143.  
  144. When you want to get a handle on what a proc is doing, you can use a
  145. combination of the source in one window and the shell in another.
  146.  
  147. First, figure out what values the parameters of the proc would take on in
  148. the case you want to investigate, (perhaps from a trace while running
  149. things normally).
  150.  
  151. Now go to the shell and set variables with the same names as the parameters
  152. to the values you discovered through the trace.
  153.  
  154. Now go to the tcl source file and select a subset of the proc's internal 
  155. code and just load it.
  156.  
  157. After each sucessive part is run you can pop over to the shell and use it
  158. to check out the state of any variable with a simple set statement, or, 
  159. even easier, just cmd-dbl-click or a variable name you want to inspect the 
  160. value of.
  161.  
  162. I've found this real useful for investigating menu routines, you can change
  163. the menu creation string that the proc gave you and just select and reload
  164. it to see if your changes will do what you want.
  165.  
  166. Tom
  167.  
  168. ===============================================================================
  169.  
  170.           Known Bugs
  171.  
  172. (As of Alpha 7.2)
  173.  
  174. These are all bugs with Alpha's internal compiled code, _not_ with the 
  175. Tcl scripts which come with Alpha.  You will have to work around them 
  176. where possible.  
  177.  
  178. ()    Dead-key followed by delete removes several characters.
  179.  
  180. ()    When saving large files, the window sometimes goes blank.  Cmd-L
  181.     brings the text back again (it's a visual problem only)
  182.  
  183. ()    under  MacOS 8, sometimes when Alpha is already running and you 
  184.     double click on a file in the finder to open Alpha, you can get
  185.     an error -917 (in the finder) and the file isn't opened.  I think
  186.     OS 8 sends a different aevent to an application of it is already
  187.     running, and this may be the problem.
  188.     
  189. ()    If I hit the key equivalent of a menu-item, it is called even if the
  190.     menu item has been disabled.  (This is a MacOS problem and will probably
  191.     never be fixed in Alpha)
  192.     
  193. ()    Multi-line edit boxes in dialogs should allow 'return' to be pressed,
  194.     without triggering the 'OK' button.  Otherwise there is no way to enter
  195.     a return.  (sure you can enter '\r' and have the calling procedure
  196.     manipulate the result, but that's not a good solution; also the above
  197.     is standard MacOS behaviour).
  198.     
  199. ()    gotoTMark often scrolls the window all the way to the top (0), 
  200.     before scrolling back to a TMark!  This gives the window a 
  201.     horrible up/down jerk motion when moving from one TMark to the 
  202.     next.
  203.  
  204. ()    'replaceText' on a large block of text which overlaps the top of 
  205.     the window (i.e.  half a big paragraph is off the top of the 
  206.     window, half is still visible, and we now replace the paragraph 
  207.     with some different text) causes a re-draw error in which the 
  208.     replacement text is all drawn in the window (from the top down) 
  209.     when only some of it should be visible.  This gives the illusion of 
  210.     over-writing other stuff in the window.  All is ok if you scroll up 
  211.     and down to refresh.
  212.  
  213.     This is most often manifested when using 'fillParagraph' on a large 
  214.     paragraph which overlaps the top of the window.
  215.     
  216. ()    I tried out Adobe Type Reunion Deluxe 2.0 the other day, and it thinks 
  217.     the 'modes menu' towards the right end of the status bar is a font 
  218.     menu!  Most peculiar.
  219.  
  220. ()  Several people have reported these two problems, but not everyone
  221.     sees them:
  222.     
  223.     >Just a quick note...  I am using 7.0b2 on my 9500/132 and 8100/100AV.  On
  224.     >my 8100, the tear-off menus are chopped off on the right side when you tear
  225.     >them off to stand alone.  This happens on a friend's 8100/80 as well.
  226.     >
  227.     
  228.     I'm using Alpha 6.52 on a Starmax 4100 with 7.6.1 and Aaron and I
  229.     experience the same menu tear-off problem.  I also experienced it with 6.5
  230.     and 6.51 (I think).
  231.     
  232. ===============================================================================
  233.  
  234.           Pseudo-Bugs
  235.  
  236. These are things which Alpha perhaps ought to do, but doesn't and hence
  237. can be considered suggestions for the future or just bugs.
  238.  
  239. ()    There's no way to know which application it was which replied to an
  240.     event which was passed to 'handleReply'.
  241.     
  242. ()    The colours Alpha uses are incorrect for 'yellow' and 'cyan'.  You can
  243.     fix them if you want using 'config->redefine colors'.
  244.  
  245. ()    Have a flag to allow reporting of errors which hit the top level.  
  246.     Currently such errors just vanish and you're left wondering what exactly 
  247.     did/didn't happen.  I.e. the user should be able to define a 'errorHook'
  248.     procedure which is called with such top-level errors.  (This is 
  249.     effectively the 'bgerror' feature of Tcl 8)
  250.  
  251. ()    If you use 'killWindow' from within an 'openHook' proc, Alpha will
  252.     often crash (MacsBug tells you it's in 'rowColToPos' or some such proc).
  253.     There's no way to abort the open window from within that proc that
  254.     seems to be entirely safe.
  255.     
  256. ()    There is currently no facility to get a list of eventHandlers which 
  257.     have been defined.
  258.  
  259. ()    Extend 'matchIt' to cope with '/* ...  */' pairs as well as normal 
  260.     braces.
  261.  
  262. ()    Make 'quick find' and 'reverse quick find' more powerful as follows - 
  263.     'delete' removes one character from what's currently being found (and 
  264.     goes back to where that was found, so it's a kind of 'Undo' feature).  
  265.     Also clicking in the scrollbar, or anything which doesn't actually 
  266.     affect the window shouldn't reset the quick search which it currently 
  267.     does.  Both of these are features in Emacs which I miss in Alpha (as 
  268.     opposed to the other way round which is true of most things).
  269.  
  270. ()    Implement find/replace in the current selection (there is a proc 
  271.     to do this in "procs.tcl", but far more convenient would be a check box 
  272.     in the standard find dialog box).
  273.  
  274. ()    Move the replace-in-fileset facility to the standard find dialog as 
  275.     another option.  In fact why not combine this with the above 
  276.     suggestion and have a pop-up option menu with 'search this document' 
  277.     'search current selection' 'search entire fileset' as options, instead 
  278.     of the current 'multiple files' checkbox?  'Replace All' should replace 
  279.     all occurrences in the current selection/file, whilst for filesets this 
  280.     is rather drastic so I'd suggest there be another checkbox, which says 
  281.     'replace in all files' and changes the meaning of opt-cmd-R in that 
  282.     case.
  283.  
  284. ()    Let a window scroll at least so that the end of the document is 
  285.     half-way up the window?  Currently the last line of text must lie at 
  286.     the very bottom of the window and this is disconcerting when typing a 
  287.     long latex file (one can of course just add a whole bunch of returns, 
  288.     but that shouldn't be necessary).
  289.  
  290. ()    When Alpha's memory is low, put up a warning dialog that you should quit
  291.     and restart.
  292.     
  293. ()    'getModifiers' opened up some new possibilities for interface routines, 
  294.     however, in a couple of places where I would like to use this, things 
  295.     are done directly with alpha and there are no Tcl proc's that we can 
  296.     hang modifications off of.  Specifically, neither of the function 
  297.     pop-up's allow you to dectect if a modifier key was held down, (you 
  298.     could then offer a different menu, say the structual marks vs.  the 
  299.     alphabetical mark recently introduced via toTclMarkFile).  Once a menu 
  300.     is presented, there is no way to detect that a choice has been made 
  301.     with a modifier key depressed, this would be useful to provide an 
  302.     automatic mark stack push (such a mechanism does work in the status 
  303.     line <mode> pop-up, if an option key is held while selecting an item 
  304.     there, the help file (if any exists) for that mode will be opened.
  305.     
  306. ()    It would be nice if matchIt could put on a little bit more of a display so 
  307.     you are better able to pick it up with your peripheral vission as you are 
  308.     typing. Maybe "halo' the matchIt position before flashing the character, 
  309.     or form a cross of hilited char positions (above and below, both sides) 
  310.     before flashing the matchIt character.
  311.     
  312.     
  313.           Fixed but not released.
  314.  
  315. Things which have been fixed in Alpha 8.0 (release date unknown)
  316.  
  317. ()  'eval ... $args' where the last elment of args was
  318.     something like "} " converts the trailing space into a backslash.
  319.     This is a bug in Tcl 7.5, which has since been fixed.
  320.  
  321. ()    If we have a menu item with a key-equivalent and a mark-charcter, 
  322.     like this: "!≠/=<Ineq", the 'item' sent to the menu proc is
  323.     not 'neq' as it should be, but rather '!≠neq'.  This is a bug.
  324.     
  325. ()    Cursor-key-bindings can't appear in menus.  More precisely the glyphs
  326.     for the arrow keys can appear, but the menu doesn't create the
  327.     appropriate binding for the keys, so the shortcut doesn't function.
  328.     A workaround is to define 'Bind ...' statements in addition to the
  329.     menu, but this is a bug.
  330.     
  331. ()  the GetTMarks list doesn't contain the duplicate window markers
  332.     <2>, <3> etc, as returned by [winNames -f].  This could be considered
  333.     a bug or a feature. 
  334.  
  335. ()    GetTMarks thinks non-file windows are in the '[pwd]' directory,
  336.     rather than in no directory at all.
  337.  
  338. ()    You can't make a menu with both menu-form-conversion and not, unless
  339.     you build it with 'addMenuItem ?-m?', but then you can't add dynamic
  340.     items or sub-menus.  What is needed is a code, like '&', to go in
  341.     the 'menu' command which says "don't convert this item".
  342.  
  343. ()  Error replies to 'dosc' are not always handled correctly:
  344.  
  345.     Welcome to Alpha's Tcl shell.
  346.     «Alpha ƒ» dosc -c 'WIsH' -s "file asfasf"
  347.     Error: Error: 1
  348.     «Alpha ƒ» dosc -c 'WIsH' -s "info asfasf"
  349.     Error: Error: bad option "asfasf": must be args, body, cmdcount, commands, 
  350.     complete, default, exists, globals, hostname, level, library, loaded, locals, 
  351.     nameofexecutable, patchlevel, procs, script, sharedlibextension, tclversion, 
  352.     or vars
  353.     «Alpha ƒ» 
  354.         
  355.     One might think this was a problem on 'WIsH's end of things, but 
  356.     if you replace the above by the equivalent 'AEBuild ...  misc dosc 
  357.     ...'  then it is clear the reply is correct.  Therefore Alpha is 
  358.     screwing up somewhere in 'dosc'. 
  359.  
  360. ()    The dialog command (i) fails when given a huge number of items in
  361.     more than 8 panes. (call 'global::allPrefs' to see this happen --
  362.     that's why the prefs have to be subdivided now). (ii) isn't
  363.     documented completely: '-n' option needs explaining.
  364.     
  365. ()    Also there's no command to disable an entire menu in one go.
  366.     
  367. ()    Furthermore, matchIt fails when matching the '{}' begin and end 'proc'
  368.     pair of a large function.  'balance' works still!  As a concrete
  369.     example, look at proc TeX::Completion::Cite.  matchIt has a built in 
  370.     default of 3000 char max to search.
  371.  
  372. ()    Let 'diff' work on files with Unix eol's as well as just mac ones 
  373.     (it 'works', but treats the entire file as a one line).
  374.  
  375. ()    'dialog' doesn't cope with _very_ complex multi-page dialogs
  376.  
  377. ()  Menu names can't be longer than 24 chars.  Can be problematic
  378.     for filesets menu.  Maximum is now 31 chars (max length of a file
  379.     in MacOS at present).
  380.  
  381. ()    The optional parameter to 'matchIt' doesn't seem to have any effect
  382.     for me.  E.g. the following two procs (when bound to a key) both can
  383.     take up to 10 seconds to return in a large (200k) file.  Presumably the
  384.     first is only supposed to search 200 characters so should be quick.
  385.  
  386.     proc matchFast {} {
  387.         if ![catch {matchIt ")" [lineStart [getPos]] 200} paren] {
  388.             alertnote "yes"
  389.         } else {    
  390.             alertnote "no"
  391.         }
  392.     }
  393.     proc matchSlow {} {
  394.         if ![catch {matchIt ")" [lineStart [getPos]]} paren] {
  395.             alertnote "yes"
  396.         } else {    
  397.             alertnote "no"
  398.         }
  399.     }
  400.  
  401. ()    The 'time' command reports ticks not microseconds.  Ticks aren't 
  402.     much use (too coarse-grained)
  403.  
  404. ()  The string returned from any 'dialog ....' edit box is not 
  405.     appended to the result correctly.  The result should be a list
  406.     of items, but I guess 'append' rather than 'lappend' is used
  407.     internally.  Example: if a dialog has an edit-item as the
  408.     first item, and I enter '} then {' (to search for obsolete Tcl 
  409.     syntax), the string returned by dialog '{res1 res2 ...}' is 
  410.     actually '{} then { res2 ...}' which is obviously completely
  411.     wrong.  It should have been {{\} then \{} res2 ...}.  Alpha
  412.     should be using 'lappend' internally which will do all the
  413.     hard work of quoting the result for you.  I think the same
  414.     problem occurs with many of Alpha's standard dialogs.
  415.     
  416. ()    the '-c' menu option to ignore all meta-characters also ignores all 
  417.     sub-menus (or rather it puts some weird character in the menu and 
  418.     there is no sub-menu).
  419.  
  420. ()  rememberPatternHook is called without quoting its arguments correctly
  421.     This means the call fails if either search of replace string contain
  422.     unquoted '{' or '}'.  (see bug a few lines up for probable solution) 
  423.  
  424. ()     Add commands/options: (Vince _really_ wants these!)
  425.  
  426.     'GetTMarks ?-w win?'
  427.     'replaceText ?-w win? ...'
  428.     'getPosOfTMark ?-w win? name'
  429.     
  430. ()  'matchIt "\]" $pos' never works --- the ']' argument to matchIt 
  431.     isn't handled correctly; the proc always returns 'no match found'
  432.  
  433. ()    Menu key bindings to items which contain square brackets '[]' do not
  434.     work.  This is because the binding is evaluated, which tries to
  435.     evaluate the '[xxx]'.  When creating the menu item, the text should
  436.     have been surrounded by '{}'.  This is most often manifested in the
  437.     window menu, for which keyboard equivalents cmd-0-9 do not work if
  438.     a window's name contains square brackets.
  439.     (There is a pseudo-workaround for this in the Tcl code).
  440.     Again this is probably a problem with append vs lappend used 
  441.     internally.
  442.  
  443. ()    removeTMark doesn't seem to work
  444.  
  445. ()    Almost none of Alpha's file/glob/cd/... commands support aliases
  446.     This would be fixed with Tcl8.0
  447.     
  448. ()    grep, scanfile etc. basically fail on Unix format files: they think
  449.     any match is on the first line of the file.  This is especially
  450.     useless for batch searches in which every match is listed as being
  451.     on the first line.  Upgrading to Tcl 8 should help this!
  452.     
  453. ()    icGetPref has some problems (other problems listed below too): 
  454.  
  455.     «Alpha ƒ» icGetPref Helper•http
  456.     lG1MacLynxphervigator™ 3.0
  457.  
  458. ()    icGetPref on many items returns 'ic err: -670' which is the following 
  459.     error:
  460.     
  461.         icTruncatedErr = -670,    /* more data was present than was returned */
  462.     
  463.     This happens for 'DownloadFolder' for example (_many_ others too).
  464.         
  465. ()    posToRowCol doesn't deal with tabs.  Is this a bug or a 
  466.     feature?  Basically on a line beginning with a tab, I'd expect 
  467.     [posToRowCol $start] to be "X 0", and [posToRowCol [incr 
  468.     start]] to be "X 4" (or "X 8" or whatever).  
  469.     
  470.     To put this another way, 'posToRowCol [getPos]' does not have the same
  471.     value as the row/col indicator in the status bar. 
  472.   
  473. ()  If you have an untitled dirty window which is not at the front, and then 
  474.     use 'Save all', you will get a save dialog for the window at the front, not 
  475.     the untitled one behind.
  476.  
  477. ()    'regModeKeywords' colorizes keywords without regard to capitalizations, there 
  478.     are plenty of languages where capitalization is significant, it would be 
  479.     nice to have a switch to tell alpha not to ignore keyword capitalization.
  480.     
  481. ()    Let 'scanfile' etc.  work on files with Unix eol's as well 
  482.     as just mac ones (they 'work', but treat the entire file as a 
  483.     single line, which isn't too helpful).  Also 'gets' treats an 
  484.     entire file as a single line if it's delimited by '\n'.  I guess
  485.     these issues would be resolved by updating Alpha's Tcl core to 7.6/8.0.
  486.  
  487. ()    Adjusting tab-size/font should not dirty the window.
  488.     (There is a work-around for this in "coreFixes.tcl")
  489.         
  490. ()    There are numerous problems (small and large) with Alpha's moveFile
  491.     removeFile etc.  These will go away if Alpha upgrades to Tcl8.0.
  492.     Here's an example: let's say we have files '$a' and '$b' and
  493.     we wish to replace $a with $b.  Then we can't do it.
  494.     
  495.     deleteFile $a ; moveFile $b $a   ;# gives 'unknown error'
  496.     moveFile $a ${a}~ ; moveFile $b $a ; deleteFile ${a}~  ;# gives error
  497.  
  498. ()     Make the 'listpick' box width & height user configurable?
  499.  
  500. ()    The following line exhibits a bug in the auto-wrap feature of 
  501.     Alpha.  It occurs with any long line which contains no internal
  502.     space but does contain punctuation/braces.  (This actually occurs
  503.     quite frequently in latex 'equation' environments).  Move the 
  504.     cursor to somewhere near the end of the line and start typing (make 
  505.     sure the window isn't read only).  Blank lines are inserted 
  506.     before the given line!    
  507.     
  508.     ,asbafsafaskasd.jsasassdkasdas,d{adasdadhja}skasddaasdasasasasasasasaasas
  509.     
  510. ()    'puts stderr blah' brings up a SIOUX window and crashes Alpha.  Alpha 
  511.     should be linked with the sioux-stubs, so no sioux-code is linked in,
  512.     and these puts commands should be diverted to some Tcl proc equivalent.
  513.     (the procedure tclLog in "library.tcl" is a good standard alternative)
  514.     Vince can supply you with some C code which will divert stdio to
  515.     given tcl procedures.
  516.  
  517. ()    bringToFront doesn't work on window names which contain colons 
  518.     (unusual case I know)
  519.  
  520. ()    There is no way to get or set the font or font-size of a window from Tcl
  521.  
  522. ()    If a file is opened with a selection (say everything: cmd-A), 
  523.     then closed, and then the data-fork of the file is changed, so 
  524.     that it is shorter, on re-opening the file, the highlighting is 
  525.     v.  odd, and I had to redraw the window to fix it (ctrl-l).  
  526.     Alpha should probably check if highlighting runs past the end of 
  527.     the file.
  528.  
  529. ()    The interaction of the search dialog box with the 'grepfset' procedure
  530.     is incorrect:
  531.  # 
  532.  # "grepfset" --
  533.  # 
  534.  #  args: wordmatch ?-nocase? expression fileset
  535.  #  Obviously we ignore wordmatch
  536.  #  
  537.  #  If the 'Grep' box was set, then the search item is _not_ quoted.
  538.  #  
  539.  #  Non grep searching problems:
  540.  #  
  541.  #  If it wasn't set, then some backslash quoting takes place. 
  542.  #  (The chars: \.+*[]$^ are all quoted)
  543.  #  Unfortunately, this latter case is done incorrectly, so most
  544.  #  non-grep searches which contain a grep-sensitive character fail.
  545.  #  The quoting should use the equivalent of the procedure 'quote::Regfind'
  546.  #  but it doesn't quote () and perhaps other important characters.
  547.  #  
  548.  #  Even worse, if the string contained any '{' it never reaches this
  549.  #  procedure (there must be an internal error due to bad quoting).
  550.  # 
  551.  
  552. ()   Some of them seem to be caused by Alpha not using 
  553.      'lappend' internally when it should be (it often seems to use 'append' 
  554.     together with some inadequate quoting instead).  This causes big 
  555.     problems when characters like '[]{}' are involved.
  556.  
  557. ()    Cmd-double-clicking seems first to check if there is a ':' anywhere in the
  558.     non-whitespace surrounding the click position, and if so sends that text
  559.     off to Internet Config.  Unfortunately if IC doesn't think it is a URL 
  560.     (often the case since, for instance, TeX labels and Tcl procedure names
  561.     may contain colons) the standard 'CmdDblClick' procedure is never called.
  562.     In such a case the cmd-dbl-click is just lost. One way around this is to 
  563.     double-click to get the selection you want, and then invoke the 
  564.     CmdDblClick routine via its keybinding (default = F6).
  565.  
  566. ()    searching backwards for this regexp in a window can lock Alpha up
  567.     or crash with error 28 (stack hits heap):
  568.  
  569.         (/\*([^*]|[^*]\/|\*[^\/]|\r)*\*/|^\[ \t\]\t*\$)
  570.  
  571.     Vince can supply a 100% reproducible example of this if needed.
  572.     Minor variants on this regexp have the same problem.  This occurs
  573.     when using text::genericIndent when editing javascript code in
  574.     HTML pages.  I'm not sure what the search is seeing that causes
  575.     the problem.  (text::genericIndent has since been rewritten to
  576.     avoid this trouble). (Will be fixed with new regexp code)
  577.  
  578. ()  'regexp {\w} a' == 1, but 'regexp {[\w]} a' == 0, i.e. the \w only
  579.     matches if it isn't inside a range!  There are many other regexp problems.
  580.     This isn't quite right: regexp {[\w]} a == 0 , but regexp {[\w]+} a == 1.
  581.     Very weird.  (Will be fixed with new regexp code)
  582.  
  583. ()  Regexp's still have some problems:
  584.  
  585.     «Alpha ƒ» regsub -all {\W} {aaaaaa  aa} {Z} t
  586.     14
  587.     «Alpha ƒ» set t
  588.     aaaaaaZZaaZZZtZZZZgæZZézZDZÇZC0Z
  589.     «Alpha ƒ» 
  590.     
  591.     This used to give:
  592.     
  593.     «Alpha ƒ» regsub -all {\W} {aaaaaa  aa} {Z} t
  594.     7
  595.     «Alpha ƒ» set t
  596.     aaaaaaZZaaZZZtZZZ
  597.     
  598.     which is also wrong.
  599.     (Will be fixed with new regexp code)
  600.  
  601.           Half-fixed:
  602.  
  603. ()    when dealing with a menu with more than perhaps 20 items, Alpha won't
  604.     unconvert the menu-item when it is sent to the menu-proc.  So if I
  605.     build a menu with 'Menu -n Name -p my_proc {lots of items... thisOne}'
  606.     then 'thisOne' appears in the menu as 'This One' (as desired), but
  607.     when it is selected, the call is 'my_proc Name "This One"' which
  608.     is incorrect.  The menu items near the top of the menu work fine!
  609.     
  610. ()    There are many other problems with long menus: 'enableMenuItem'
  611.     doesn't work properly. i.e. enableMenuItem $m thisOne 0 will
  612.     say there's no item with that name, and enableMenuItem $m "This One" 
  613.     0 will not complain, but won't actually disable the item either!
  614.     (Fix only applies with MacOS 8.5 or newer, and ought to work,
  615.     except it seems there's a mercutio problem which means things
  616.     still don't work!)
  617.  
  618.