home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / smalltal / 2600 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  2.5 KB

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!comlab.ox.ac.uk!oxuniv!vollrath
  2. From: vollrath@vax.oxford.ac.uk
  3. Newsgroups: comp.lang.smalltalk
  4. Subject: Tips and oddments
  5. Message-ID: <1992Dec21.190414.10941@vax.oxford.ac.uk>
  6. Date: 21 Dec 92 19:04:14 GMT
  7. Organization: Oxford University VAX 6620
  8. Lines: 75
  9.  
  10. Hi everybody,
  11.  
  12.     I have a few questions coming up shortly about bugs in
  13. Smalltalk V/Mac, which other people may have overcome. Since
  14. I like to pay for the time people save me, I intend to 
  15. contribute the occasional oddment that has saved me time or 
  16. added functionality to my system. If other people feel like
  17. doing this, the value of this newsgroup would increase even
  18. more for me.
  19.  
  20. I find that I am often working on more than one thing, and when
  21. I get stuck somewhere, I leave it and come back later. Sometimes,
  22. I hard code a return value, while I sort out other things needed
  23. to get the real value. All this means: a) I'm a sloppy worker :^)
  24. and b) there are various places that I want to remember to return
  25. to. This is my solution. I add an item to the Smalltalk menu called
  26. 'Alun's notes', which brings up a browser of all the places that are
  27. left unfinished.  Within a method, I write something like this:
  28.  
  29. {code code code}
  30. self noteToAlun. "May need to change later, because blah blah"
  31.  
  32. All methods containing such a line can be immediately found by choosing
  33. the 'Alun's Notes' menu item.  
  34.  
  35. The code is very simple, just change 'Alun' to your name, add the 
  36. following methods, and then execute: 
  37.  
  38. Menu initialize.
  39.  
  40. Enjoy!
  41.  
  42. "---------------------------------------------------------------------"
  43.  
  44. !Object methods !
  45.  
  46. noteToAlun
  47.         "Browse senders to find methods thus flagged.
  48.          Added by Alun."! !
  49.  
  50.  
  51. !Dispatcher methods !
  52.  
  53. notesForAlun
  54.         "Show all notes for Alun in the system."
  55.  
  56.  
  57.     Smalltalk sendersOf: #noteToAlun.! !
  58.  
  59.  
  60. !Menu class methods !
  61.  
  62. doitMenu
  63.     "Answer the menu to be displayed under the Smalltalk heading."
  64.  
  65.     ^ (Menu labels:
  66.                 ('Show it/J\Do it/D\File It In\Inspect it/I\',
  67.                  'Stop/.\Alun''s Notes')
  68.                      breakLinesAtBackSlashes
  69.             lines:
  70.                 #(4 5)
  71.             selectors:
  72.                 #(printIt doIt fileItIn inspectIt
  73.                   controlBreak notesForAlun))
  74.             title: 'Smalltalk'! !
  75.  
  76. *******************************************************************
  77. Alun ap Rhisiart
  78. Animal Behaviour Research Group
  79. Oxford University.
  80.  
  81. When I wrote this, only God and I knew what it meant.
  82. Now, only God knows
  83.  
  84. ********************************************************************
  85.