[Newbies] code to retrieve all method categories and methods under a category

tty gettimothy at zoho.com
Wed Jan 15 19:26:53 UTC 2020

Hi All.

I want to dynamically build a drop-down menu in Seaside based on the
instance side methods I have in a class.

#MyClass has method categories: "Attributes Links Paragraph....etc"
Under Method category Links are  methods #testLinkCategory,
testLinkExternal, testLink....etc.

I have been hunting for over an hour and I see no obvious way to retrieve
this info (I have found a way to get all the methods, but not the category
that houses them.

The code I have in mind has form:

*categories := categoriesFor: #MyClass.

categories do:[:cat | |methods|
             methods :=  methodForClass:#MyClass category: cat.
             methods do:[:m | 
                             "dynamically build my html here"

Any help much appreciated.


Sent from: http://forum.world.st/Squeak-Beginners-f107673.html

More information about the Beginners mailing list