generateAspectMethods: code2
authorca
Fri, 28 Feb 1997 18:04:09 +0100
changeset 69 e533f77871dd
parent 68 889c3877baf0
child 70 4e667db10910
generateAspectMethods: code2
UIPainterView.st
--- a/UIPainterView.st	Fri Feb 28 18:03:28 1997 +0100
+++ b/UIPainterView.st	Fri Feb 28 18:04:09 1997 +0100
@@ -402,11 +402,13 @@
     |cls code|
 
     className isNil ifTrue:[
-        ^ self warn:'set the class first'
+        self warn:'set the class first'.
+        ^ ''
     ].
-    (cls := Smalltalk at:className asSymbol) isNil ifTrue:[
-        ^ self warn:'create the class first'
-    ].
+"/    (cls := Smalltalk at:className asSymbol) isNil ifTrue:[
+"/        self warn:'create the class first'.
+"/        ^ ''
+"/    ].
 
     code := ''.
 
@@ -1152,7 +1154,8 @@
     menu := PopUpMenu labels:( resources array:#(
                                   'copy' 
                                   'cut' 
-                                  'paste' 
+                                  'paste'
+                                  'undo'
                                   '-' 
                                   'arrange'
                                   'dimension'
@@ -1162,6 +1165,7 @@
                    selectors:#(   #copySelection
                                   #deleteSelection
                                   #pasteBuffer
+                                  #undoLast
                                   nil
                                   #arrange
                                   #dimension
@@ -1174,12 +1178,14 @@
                                   nil
                                   nil
                                   nil
+                                  nil
                               )
                      receiver:self.
 
     (canPaste and:[self canPasteInto:selection]) ifFalse:[
         menu disable:#pasteBuffer
     ].
+    undoHistory isEmpty ifTrue:[menu disable:#undoLast].
 
     menu subMenuAt:#arrange   put:(self subMenuArrange).
     menu subMenuAt:#dimension put:(self subMenuDimension).