TOTO List

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

TOTO List

Chiara-2
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?

--
Saludos Chiara

"Peace cannot be kept by force; it can only be achieved by understanding."
Albert Einstein
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: TOTO List

cdavidshaffer
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:


myMethod

    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
example).


2) You could do this instead:

myMethod
    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:

myMethod
    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.

HTH,

David

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: TOTO List

cdavidshaffer
...and if you choose method 3 you could create a scriptable button on
your desktop and use this code as its script:

SystemNavigation default browseAllCallsOn: #todo

and set its action to occur on "Mouse up".  Now you've got a simple tool
to browse all of your "todo's".


Details (creating a button using "point and click"):

1) Drag a Sciptable Button morph from the Supplies flap onto your desktop
2) Raise the halo on that button and click the "Show viewer" halo button
(looks like an eye).  A viewer should appear on the right hand side of
your screen
3) In the viewer click on a pink pop-down menu (usually "basic" is
availble...click on it) and select "scripts".
4) Drag an emptyScript tile onto your desktop
5) Click the empty square (the third widget from the left) to indicate
that you will enter Smalltalk source code directly.  You should see this:

script1
    ^ self

6) Change this script to:

script1
    SystemNavigation default browseAllCallsOn: #todo

7) With focus still in the source code window press alt-s to save the
script (or right click and pick "accept" from the menu)
8) Click on the pop-up menu currently labeled "normal" and change it to
"mouseUp"
9) Test that things are working by clicking your button (it is probably
currenltly labeled "Press Me")
10) If things are working click the circle icon (second from the left)
in the script editor morph and the same icon in the viewer to hide both
of them.
11) Raise the halo on your button again but this time select the red
"Menu" halo button.
12) Select "change label" from this menu and set the label of your
button to something you like (such as "Browse TODO list")
13) Use the halo to change the color (I'll leave this one to you)

There are two alternatives to the steps above which you might want to try:

a) Use "change target", "change action selector" and "change arguments"
from the red halo menu
b) Write code to create the button

HTH,

David

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: TOTO List

Chiara-2
thanks a lot :D

On 7/18/06, David Shaffer <[hidden email]> wrote:

> ...and if you choose method 3 you could create a scriptable button on
> your desktop and use this code as its script:
>
> SystemNavigation default browseAllCallsOn: #todo
>
> and set its action to occur on "Mouse up".  Now you've got a simple tool
> to browse all of your "todo's".
>
>
> Details (creating a button using "point and click"):
>
> 1) Drag a Sciptable Button morph from the Supplies flap onto your desktop
> 2) Raise the halo on that button and click the "Show viewer" halo button
> (looks like an eye).  A viewer should appear on the right hand side of
> your screen
> 3) In the viewer click on a pink pop-down menu (usually "basic" is
> availble...click on it) and select "scripts".
> 4) Drag an emptyScript tile onto your desktop
> 5) Click the empty square (the third widget from the left) to indicate
> that you will enter Smalltalk source code directly.  You should see this:
>
> script1
>     ^ self
>
> 6) Change this script to:
>
> script1
>     SystemNavigation default browseAllCallsOn: #todo
>
> 7) With focus still in the source code window press alt-s to save the
> script (or right click and pick "accept" from the menu)
> 8) Click on the pop-up menu currently labeled "normal" and change it to
> "mouseUp"
> 9) Test that things are working by clicking your button (it is probably
> currenltly labeled "Press Me")
> 10) If things are working click the circle icon (second from the left)
> in the script editor morph and the same icon in the viewer to hide both
> of them.
> 11) Raise the halo on your button again but this time select the red
> "Menu" halo button.
> 12) Select "change label" from this menu and set the label of your
> button to something you like (such as "Browse TODO list")
> 13) Use the halo to change the color (I'll leave this one to you)
>
> There are two alternatives to the steps above which you might want to try:
>
> a) Use "change target", "change action selector" and "change arguments"
> from the red halo menu
> b) Write code to create the button
>
> HTH,
>
> David
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>


--
Saludos Chiara

"Peace cannot be kept by force; it can only be achieved by understanding."
Albert Einstein
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners