[Newbies] TOTO List

David Shaffer cdshaffer at acm.org
Tue Jul 18 17:33:39 UTC 2006

Chiara wrote:

> Hi, I'm new in squeak and its world. It is great although it has a
> lack of certain functionality, or at last i didn't find it :-).
> Is there a way to "attach" a TODO list remainder to a class or a method?
> I want to have the todo list for a class integrated into the browser.
> Is there any tool with this functionality?

Some options:

1) There is a flag: method (in ProtoObject) which does nothing and is
commonly used to mark methods which need more work.  Here's an example:


    self flag: #performanceProblem
    ...your code here...

then if you browse senders of performanceProblem you'll see this
method.  However this doesn't seem to be quite what you want since you'd
have to remember all of the flags (such as performanceProblem in this

2) You could do this instead:

    self flag: #todo "Clean up this code!"

then you'd browse senders of todo. 

3) Finally we can always make our own method (add this to Object):

todo: aString
    "Send this method to add a TODO to a method"

Then in you code you would do something like this:

    self todo: 'Clean up code'

then you would simply search for senders of todo: to get a "todo list"
for your code.  When you add a method like this to Object which you plan
to use in a lot of projects you might consider packaging it in a cross
project package.  I have a package called SCUtilities which holds these
kinds of things.  So the method #todo in Object would be in a method
category called *SCUtilities so it becomes part of that Monticello package.



More information about the Beginners mailing list