*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Wed, 22 Sep 2004 09:22:24 +0200
changeset 8574 33bb637901eb
parent 8573 240f0fa27d20
child 8575 ed527f499503
*** empty log message ***
Object.st
UndefinedObject.st
--- a/Object.st	Wed Sep 22 09:15:38 2004 +0200
+++ b/Object.st	Wed Sep 22 09:22:24 2004 +0200
@@ -504,6 +504,7 @@
     "Modified: 23.4.1996 / 16:00:07 / cg"
 ! !
 
+
 !Object methodsFor:'Compatibility-Dolphin'!
 
 trigger:anAspect 
@@ -8130,6 +8131,13 @@
 
 !
 
+ifNotNilDo:aBlock
+    "if the reciever is non-nil, return the value of aBlock, passing myself as argument.
+     Otherwise do nothing and return nil."
+
+    ^ aBlock value:self
+!
+
 isArray
     "return true, if the receiver is some kind of array (or weakArray etc);
      false is returned here - the method is only redefined in Array."
@@ -9164,7 +9172,7 @@
 !Object class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.513 2004-09-21 10:30:41 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.514 2004-09-22 07:22:24 cg Exp $'
 ! !
 
 Object initialize!
--- a/UndefinedObject.st	Wed Sep 22 09:15:38 2004 +0200
+++ b/UndefinedObject.st	Wed Sep 22 09:22:24 2004 +0200
@@ -152,6 +152,7 @@
 
 ! !
 
+
 !UndefinedObject methodsFor:'binary storage'!
 
 storeBinaryOn: stream manager: manager
@@ -598,7 +599,7 @@
         This method is open coded (inlined) by the compiler(s)
         - redefining it may not work as expected."
 
-    ^ self
+    ^ nil
 !
 
 ifNotNil:notNilBlockOrValue ifNil:nilBlockOrValue
@@ -611,6 +612,13 @@
     ^ nilBlockOrValue value
 !
 
+ifNotNilDo:aBlock
+    "if the reciever is non-nil, return the value of aBlock, passing myself as argument.
+     Otherwise do nothing and return nil."
+
+    ^ nil
+!
+
 isEmptyOrNil
     "Squeak compatibility:
      return true if I am nil or an empty collection - since I am nil, return true.
@@ -683,7 +691,7 @@
 !UndefinedObject class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.59 2004-06-11 18:15:33 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.60 2004-09-22 07:21:54 cg Exp $'
 ! !
 
 UndefinedObject initialize!