[squeak-dev] Etiquette of adding a Class side *method category and method to ProtoObject

gettimothy gettimothy at zoho.com
Mon May 18 19:43:33 UTC 2020


Hi Foks,



TL;DR; is it a "BAD THING TO DO" to add a class side method to ProtoObject?





ProtoObject >> help



^'foo'







Now every class A to Z in the system has a built in help message:



AColorSelectorMorph help --> 'foo'

ZoomMorph help --> 'foo'







"Smalltalk" is not a class, so figure that out later..plus packages etc.



Smalltalk help

SmalltalkImage(Object)>>doesNotUnderstand: #help







Longer version



I am going to dabble with my idea of re-working help in Smalltalk.





Each Class will respond to the "help" class side method , so I figured start at the top with ProtoObject



I am going to try a Visitor/Decorator pattern for every class in the system

ProtoObject >>  help



|help|



help := MySoonToBeCodedVisitorClass visit: self.



^help



Initially, just return the Class Comments, but with the MySoonToBeCodedVisitorClass later decorating the class comment and returning information from other sources too.





BUT!!! I do not want to pollute ProtoObject if it is agains decorum.



Thanks for your time
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200518/d8885fa5/attachment.html>


More information about the Squeak-dev mailing list