home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!bnr.co.uk!uknet!comlab.ox.ac.uk!oxuniv!vollrath
- From: vollrath@vax.oxford.ac.uk
- Newsgroups: comp.lang.smalltalk
- Subject: Tips and oddments
- Message-ID: <1992Dec21.190414.10941@vax.oxford.ac.uk>
- Date: 21 Dec 92 19:04:14 GMT
- Organization: Oxford University VAX 6620
- Lines: 75
-
- Hi everybody,
-
- I have a few questions coming up shortly about bugs in
- Smalltalk V/Mac, which other people may have overcome. Since
- I like to pay for the time people save me, I intend to
- contribute the occasional oddment that has saved me time or
- added functionality to my system. If other people feel like
- doing this, the value of this newsgroup would increase even
- more for me.
-
- I find that I am often working on more than one thing, and when
- I get stuck somewhere, I leave it and come back later. Sometimes,
- I hard code a return value, while I sort out other things needed
- to get the real value. All this means: a) I'm a sloppy worker :^)
- and b) there are various places that I want to remember to return
- to. This is my solution. I add an item to the Smalltalk menu called
- 'Alun's notes', which brings up a browser of all the places that are
- left unfinished. Within a method, I write something like this:
-
- {code code code}
- self noteToAlun. "May need to change later, because blah blah"
-
- All methods containing such a line can be immediately found by choosing
- the 'Alun's Notes' menu item.
-
- The code is very simple, just change 'Alun' to your name, add the
- following methods, and then execute:
-
- Menu initialize.
-
- Enjoy!
-
- "---------------------------------------------------------------------"
-
- !Object methods !
-
- noteToAlun
- "Browse senders to find methods thus flagged.
- Added by Alun."! !
-
-
- !Dispatcher methods !
-
- notesForAlun
- "Show all notes for Alun in the system."
-
-
- Smalltalk sendersOf: #noteToAlun.! !
-
-
- !Menu class methods !
-
- doitMenu
- "Answer the menu to be displayed under the Smalltalk heading."
-
- ^ (Menu labels:
- ('Show it/J\Do it/D\File It In\Inspect it/I\',
- 'Stop/.\Alun''s Notes')
- breakLinesAtBackSlashes
- lines:
- #(4 5)
- selectors:
- #(printIt doIt fileItIn inspectIt
- controlBreak notesForAlun))
- title: 'Smalltalk'! !
-
- *******************************************************************
- Alun ap Rhisiart
- Animal Behaviour Research Group
- Oxford University.
-
- When I wrote this, only God and I knew what it meant.
- Now, only God knows
-
- ********************************************************************
-