doCreateNamespace confirmation
authorClaus Gittinger <cg@exept.de>
Mon, 11 Feb 2002 11:00:17 +0100
changeset 6385 13220cec589e
parent 6384 ac56e28add2c
child 6386 2434f5e652ea
doCreateNamespace confirmation
ClassBuilder.st
--- a/ClassBuilder.st	Mon Feb 11 10:26:38 2002 +0100
+++ b/ClassBuilder.st	Mon Feb 11 11:00:17 2002 +0100
@@ -299,7 +299,7 @@
      thisIsPrivate oldCIVNames newCIVNames nsName namespace
      oldSuperClass newSuperClass oldCategory
      recompileGlobalAccessTo stringOfClassInstVarNames answer
-     oldClassToBecomeNew classesSuperclass newInstSize|
+     oldClassToBecomeNew classesSuperclass newInstSize doCreate|
 
     "NOTICE:
      this method is too complex and should be splitted into managable pieces ...
@@ -366,10 +366,16 @@
             namespace := Smalltalk at:nsName ifAbsent:nil.
             namespace isNameSpace ifFalse:[
                 namespace isNil ifTrue:[
-                    (Class createNameSpaceQuerySignal query
-                    or:[(self 
-                            confirm:('nonexistent namespace: `' , nsName , '''.\\Create ?') withCRs)])
-                    ifFalse:[^ nil].
+                    doCreate := Class createNameSpaceQuerySignal query.
+                    doCreate ifFalse:[
+                        doCreate := Dialog
+                            confirmWithCancel:('Nonexistent Namespace: `' , nsName , '''.\\Create ?') withCRs.
+                        doCreate isNil ifTrue:[
+                            "/ cancelled
+                            AbortSignal raise.
+                        ]
+                    ].
+                    doCreate ifFalse:[^ nil].
                     namespace := NameSpace name:nsName.
                 ] ifFalse:[
                     (namespace isBehavior
@@ -378,7 +384,7 @@
                         thisIsPrivate := true.
                         realNewName := classSymbol asSymbol.
                     ] ifFalse:[
-                        self warn:('a global named ' , nsName , ' exists, but is no namespace.') withCRs.
+                        self warn:('A global named ' , nsName , ' exists, but is no namespace.') withCRs.
                         ^ nil
                     ].
                 ]
@@ -1896,5 +1902,5 @@
 !ClassBuilder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ClassBuilder.st,v 1.11 2001-10-25 13:12:33 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ClassBuilder.st,v 1.12 2002-02-11 10:00:17 cg Exp $'
 ! !