modification dialog methods renamed
authortz
Sat, 14 Feb 1998 21:01:20 +0100
changeset 839 facc9a2103af
parent 838 d2588cca5a15
child 840 d2ea06fcf92a
modification dialog methods renamed
ListSpecEditor.st
--- a/ListSpecEditor.st	Sat Feb 14 20:43:52 1998 +0100
+++ b/ListSpecEditor.st	Sat Feb 14 21:01:20 1998 +0100
@@ -33,6 +33,16 @@
 
 !ListSpecEditor methodsFor:'accessing'!
 
+modified       
+
+    ^modified
+!
+
+modified: aBoolean         
+
+    modified := aBoolean
+!
+
 specClass
 
     ^specClass
@@ -141,8 +151,8 @@
 
 !ListSpecEditor methodsFor:'private'!
 
-checkItemModified
-    "check item modification"
+askForItemModification
+    "ask for item modification"
 
     self valueOfEnablingCommitButtons value
     ifTrue:
@@ -164,8 +174,8 @@
 
 !
 
-checkModified
-    "check modification
+askForListModification
+    "ask for list modification
     "
     modified
     ifTrue:
@@ -178,6 +188,12 @@
         modified := false
     ].
     ^true
+!
+
+askForModification
+    "ask in order for item and for list modification"
+
+    ^self askForItemModification and: [self askForListModification]
 
 !
 
@@ -189,17 +205,20 @@
 
 resourceMessage: aString
 
-    (aString isString and: [aString trimBlanks size > 0])
-    ifTrue:
+    self askForModification
+    ifTrue: 
     [
-        specClass := (aString readStream upTo: Character space) asSymbol.
-        specSelector := (aString copy reverse readStream upTo: Character space) reverse asSymbol
+        (aString isString and: [aString trimBlanks size > 0])
+        ifTrue:
+        [
+            specClass := (aString readStream upTo: Character space) asSymbol.
+            specSelector := (aString copy reverse readStream upTo: Character space) reverse asSymbol
+        ]
+        ifFalse:
+        [
+            ^nil
+        ]
     ]
-    ifFalse:
-    [
-        ^nil
-    ]
-
 !
 
 updateHistory
@@ -246,7 +265,7 @@
 closeRequest
     "close request"
 
-    (self checkItemModified and: [self checkModified]) ifTrue: [super closeRequest]
+    self askForModification ifTrue: [super closeRequest]
 
 !
 
@@ -255,7 +274,7 @@
     "
     |msg cls|
 
-    (((aMessage size > 0) and: [self checkItemModified]) and: [self checkModified]) 
+    (aMessage size > 0 and: [self askForModification]) 
     ifTrue:[
         msg := aMessage asCollectionOfWords.
 
@@ -335,5 +354,5 @@
 !ListSpecEditor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Attic/ListSpecEditor.st,v 1.2 1998-02-14 17:48:41 tz Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Attic/ListSpecEditor.st,v 1.3 1998-02-14 20:01:20 tz Exp $'
 ! !