stefan (sigh) .... must care for metaClasses changeRecords
authorClaus Gittinger <cg@exept.de>
Wed, 04 Jun 1997 14:50:42 +0200
changeset 2675 bb724aff9c75
parent 2674 5278213b500c
child 2676 38d61ed0cf40
stefan (sigh) .... must care for metaClasses changeRecords
Class.st
--- a/Class.st	Tue Jun 03 12:05:25 1997 +0200
+++ b/Class.st	Wed Jun 04 14:50:42 1997 +0200
@@ -1009,75 +1009,6 @@
 
 !Class methodsFor:'adding/removing'!
 
-addSelector:newSelector withMethod:newMethod
-    "add the method given by 2nd argument under the selector given by
-     1st argument to the methodDictionary. 
-     Append a change record to the changes file and tell dependents."
-
-    |oldMethod|
-
-    oldMethod := self compiledMethodAt:newSelector.
-
-    CatchMethodRedefinitions ifTrue:[
-        "check for attempts to redefine a method
-         in a different package. Signal a resumable error if so.
-         This allows tracing redefinitions of existing system methods
-         when filing in alien code ....
-         (which we may want to forbit sometimes)
-        "
-        oldMethod notNil ifTrue:[
-            oldMethod package ~= newMethod package ifTrue:[
-                "
-                 attempt to redefine an existing method, which was
-                 defined in another package.
-                 If you continue in the debugger, the new method gets installed.
-                 Otherwise, the existing (old) method remains valid.
-
-                 You can turn of the catching of redefinitions by setting
-                   CatchMethodRedefinitions to false
-                 (also found in the Launchers 'settings-misc' menu)
-                "
-                (MethodRedefinitionSignal
-                    raiseRequestWith:(oldMethod -> newMethod)
-                    errorString:('redefinition of ' , name , '>>' , newSelector) 
-                ) == #keep ifTrue:[
-                    newMethod package:oldMethod package
-                ].
-
-                "/ if proceeded, install as usual.
-            ]
-        ]
-    ].
-
-    "/ remember new->old association in the OldMethods dictionary (if non-nil)
-
-    OldMethods notNil ifTrue:[
-        oldMethod notNil ifTrue:[
-"/            oldMethod source:(oldMethod source).
-            OldMethods at:newMethod put:oldMethod
-        ]
-    ].
-
-    "/ remember in the projects overwritten dictionary
-
-    oldMethod notNil ifTrue:[
-        oldMethod package ~= newMethod package ifTrue:[
-            Project notNil ifTrue:[
-                "/ allow configurations without Project
-                Project rememberOverwrittenMethod:newMethod from:oldMethod
-            ]
-        ]
-    ].
-
-    (super addSelector:newSelector withMethod:newMethod) ifTrue:[
-        self addChangeRecordForMethod:newMethod.
-    ]
-
-    "Created: 29.10.1995 / 19:42:42 / cg"
-    "Modified: 9.9.1996 / 22:39:32 / stefan"
-    "Modified: 30.1.1997 / 21:08:14 / cg"
-!
-
 removeFromSystem
     "ST-80 compatibility
      remove myself from the system"
@@ -1100,14 +1031,18 @@
     |nm|
 
     self wasAutoloaded ifFalse:[
-
         "
          can it be done ?
+         (all of my methods must have a source)
         "
         self methodDictionary do:[:aMethod |
             aMethod source isNil ifTrue:[^false].
             aMethod hasPrimitiveCode ifTrue:[^ false].
         ].
+        self class methodDictionary do:[:aMethod |
+            aMethod source isNil ifTrue:[^false].
+            aMethod hasPrimitiveCode ifTrue:[^ false].
+        ].
     ].
 
     self allSubclassesDo:[:aClass |
@@ -1133,8 +1068,8 @@
      Clock open
     "
 
-    "Modified: 18.5.1996 / 15:41:49 / cg"
     "Modified: 7.6.1996 / 09:15:05 / stefan"
+    "Modified: 4.6.1997 / 14:48:02 / cg"
 ! !
 
 !Class methodsFor:'binary storage'!
@@ -3767,5 +3702,5 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.280 1997-06-03 09:56:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.281 1997-06-04 12:50:42 cg Exp $'
 ! !