Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Class categories
Last updated at 10:29 am UTC on 16 May 2017
 categories := Set new.
 Object withAllSubclassesDo: [ :each |
		each category ifNotNil: [ :category |
			categories add: category ] ].
 categories asSortedCollection inspect

Only with a specific prefix:
 | categories prefix |
 prefix := 'Add'.
 categories := Set new.
 Object withAllSubclassesDo: [ :each |
 		each category ifNotNil: [ :category |
 			(category beginsWith: prefix) ifTrue: 
 			[categories add: category ]]].
 categories asSortedCollection do: [:cat | Transcript show: cat; cr]