BrowserView.st
changeset 978 007c5b8c75b5
parent 971 3f31069f85ce
child 985 fde6b90945cc
--- a/BrowserView.st	Wed Jan 22 02:32:06 1997 +0100
+++ b/BrowserView.st	Thu Jan 23 02:41:39 1997 +0100
@@ -6686,7 +6686,7 @@
 methodMove
     "move the current method into another class; typically a superclass"
 
-    |newClass newClassName sup initial|
+    |newClass newClassName sup initial movedMethod|
 
     self checkMethodSelected ifFalse:[^ self].
 
@@ -6718,15 +6718,20 @@
             newClass := newClass class
         ]
     ].
-    (newClass compile:(currentMethod source) classified:currentMethodCategory) isNil ifTrue:[
-        self warn:'not moved - compilation failed due'.
+
+    movedMethod := newClass 
+                        compile:(currentMethod source) 
+                        classified:currentMethodCategory.
+
+    (movedMethod isNil or:[movedMethod == #Error]) ifTrue:[
+        self warn:'not moved - compilation failed due to a compilation error'.
         ^ self
     ].
 
     self methodRemove
 
     "Created: 13.12.1995 / 10:56:42 / cg"
-    "Modified: 16.1.1997 / 00:22:35 / cg"
+    "Modified: 23.1.1997 / 02:39:40 / cg"
 !
 
 methodNewMethod
@@ -9490,6 +9495,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.259 1997-01-18 15:26:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.260 1997-01-23 01:41:39 cg Exp $'
 ! !
 BrowserView initialize!