added #categoryOfElement - for RB
authorClaus Gittinger <cg@exept.de>
Wed, 02 Feb 2000 20:35:06 +0100
changeset 895 f8702324cc12
parent 894 40292337f043
child 896 035d5613a20c
added #categoryOfElement - for RB
SystemOrganizer.st
--- a/SystemOrganizer.st	Wed Feb 02 13:42:49 2000 +0100
+++ b/SystemOrganizer.st	Wed Feb 02 20:35:06 2000 +0100
@@ -65,6 +65,17 @@
     "Modified: / 20.6.1998 / 12:40:42 / cg"
 !
 
+categoryOfElement:aClassName
+    "return a classes category;
+     the argument is the classes name"
+
+    |cls|
+
+    cls := Smalltalk at:aClassName ifAbsent:nil.
+    cls notNil ifTrue:[^ cls category].
+    self error:'no such class'.
+!
+
 listAtCategoryNamed:aCategory
     "return a collection of classes in aCategory."
 
@@ -123,5 +134,5 @@
 !SystemOrganizer class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/SystemOrganizer.st,v 1.2 1998-06-20 12:27:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/SystemOrganizer.st,v 1.3 2000-02-02 19:35:06 cg Exp $'
 ! !