Issue 4406 in pharo: compare toolResgistry comment with this one, and produce a better one

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

Issue 4406 in pharo: compare toolResgistry comment with this one, and produce a better one

pharo
Status: Accepted
Owner: [hidden email]
Labels: Milestone-1.4

New issue 4406 by [hidden email]: compare toolResgistry comment with  
this one, and produce a better one
http://code.google.com/p/pharo/issues/detail?id=4406

A tool at class side should implement #registerToolsOn: method.

This method will be executed automatically for all classes, when you issue
Smalltalk resetTools

If you don't want to reset all tools (to defaults) , but instead add
new tools when package installed
just send #registerToolsOn:  in #initialize method of your tool class
with 'Smalltalk tools' as argument:

SomeTool class>>initialize

self registerToolsOn: Smalltalk tools

A typical #registerToolsOn: implementation:

SomeTool class>>registerToolsOn: registry

     registry register: self as: #someTool

And to access registered tool, now you can use 'Smalltalk tools someTool'  
idiom.


Note, that with tools registry, you are no longer need to keep (and
implement) a singleton pattern per each tool class,
which requires it , i.e.
SomeTool default doSomething.

instead, with using registry, you can register a sole tool instance
(or class) to registry , and then just write
Smalltalk tools someTool doSomething.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4406 in pharo: compare toolResgistry comment with this one, and produce a better one

pharo
Updates:
        Labels: Type-Cleanup

Comment #1 on issue 4406 by [hidden email]: compare toolResgistry  
comment with this one, and produce a better one
http://code.google.com/p/pharo/issues/detail?id=4406

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4406 in pharo: compare toolResgistry comment with this one, and produce a better one

pharo
Updates:
        Labels: -Milestone-1.4

Comment #2 on issue 4406 by [hidden email]: compare toolResgistry  
comment with this one, and produce a better one
http://code.google.com/p/pharo/issues/detail?id=4406

Not a show stopper for releasing 1.4. (but *if* someone posts code, we are  
happy to consider it to 1.4.. but nobody needs to stay awake and fix it  
before we can release 1.4)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker