ByteCodeCompiler.st
changeset 3281 b4b91a50efc4
parent 3186 2c1b6673c461
child 3284 2fc49e86930e
--- a/ByteCodeCompiler.st	Thu Aug 22 22:48:09 2013 +0200
+++ b/ByteCodeCompiler.st	Fri Aug 23 14:59:22 2013 +0200
@@ -480,13 +480,13 @@
      Returns the new method, #Error or nil."
 
     ^ self
-	compile:methodText
-	forClass:classToCompileFor
-	inCategory:'others'
-	notifying:nil
-	install:true
-	skipIfSame:false
-	silent:false
+        compile:methodText
+        forClass:classToCompileFor
+        inCategory:(self asYetUncategorizedMethodCategory)
+        notifying:nil
+        install:true
+        skipIfSame:false
+        silent:false
 !
 
 compile:aString forClass:aClass inCategory:cat
@@ -617,13 +617,13 @@
      Returns the new method, #Error or nil."
 
     ^ self
-	compile:methodText
-	forClass:classToCompileFor
-	inCategory:'others'
-	notifying:nil
-	install:doInstall
-	skipIfSame:false
-	silent:false
+        compile:methodText
+        forClass:classToCompileFor
+        inCategory:(self defaultMethodCategory)
+        notifying:nil
+        install:doInstall
+        skipIfSame:false
+        silent:false
 !
 
 compile:methodText forClass:classToCompileFor notifying:requestor
@@ -632,13 +632,13 @@
      Returns the new method, #Error or nil."
 
     ^ self
-	compile:methodText
-	forClass:classToCompileFor
-	inCategory:'others'
-	notifying:requestor
-	install:true
-	skipIfSame:false
-	silent:false
+        compile:methodText
+        forClass:classToCompileFor
+        inCategory:(self defaultMethodCategory)
+        notifying:requestor
+        install:true
+        skipIfSame:false
+        silent:false
 !
 
 compile:textOrStream in:aClass notifying:requestor ifFail:exceptionBlock
@@ -710,6 +710,10 @@
     ^ ParserFlags allowExtensionsToPrivateClasses
 !
 
+asYetUncategorizedMethodCategory
+    ^ '* As yet uncategorized *'
+!
+
 defaultMethodCategory
     "/ ^ '** As yet uncategorized **'.
     ^ '* uncategorized *'
@@ -1019,15 +1023,15 @@
     "name alias for ST-80 compatibility"
 
     ^ self
-	   compile:textOrStream
-	   forClass:aClass
-	   inCategory:'others'
-	   notifying:requestor
-	   install:true
-	   skipIfSame:false
-	   silent:false
-	   foldConstants:true
-	   ifFail:exceptionBlock.
+           compile:textOrStream
+           forClass:aClass
+           inCategory:(self class defaultMethodCategory)
+           notifying:requestor
+           install:true
+           skipIfSame:false
+           silent:false
+           foldConstants:true
+           ifFail:exceptionBlock.
 !
 
 compile:textOrStream in:aClass notifying:requestor install:install ifFail:exceptionBlock
@@ -1036,7 +1040,7 @@
     ^ self
            compile:textOrStream
            forClass:aClass
-           inCategory:'others'
+           inCategory:(self class defaultMethodCategory)
            notifying:requestor
            install:install
            skipIfSame:false
@@ -3039,7 +3043,7 @@
 
     newCategory := cat.
     newCategory isNil ifTrue:[
-        newCategory := oldCategory ? '* As yet uncategorized *'.
+        newCategory := oldCategory ? (self class asYetUncategorizedMethodCategory).
     ].
 
     "check if same source"
@@ -3286,15 +3290,15 @@
      Returns the new method, #Error or nil."
 
     ^ self
-	compile:methodText
-	forClass:aBehavior
-	inCategory:'others'
-	notifying:nil
-	install:doInstall
-	skipIfSame:false
-	silent:false
-	foldConstants:true
-	ifFail:[ #Error ]
+        compile:methodText
+        forClass:aBehavior
+        inCategory:(self class defaultMethodCategory)
+        notifying:nil
+        install:doInstall
+        skipIfSame:false
+        silent:false
+        foldConstants:true
+        ifFail:[ #Error ]
 
     "Created: / 17-07-2006 / 18:44:53 / cg"
 !
@@ -3587,11 +3591,11 @@
 !ByteCodeCompiler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.278 2013-06-12 08:36:27 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.279 2013-08-23 12:59:22 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.278 2013-06-12 08:36:27 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.279 2013-08-23 12:59:22 cg Exp $'
 !
 
 version_SVN