Object.st
changeset 13848 3bb093f6a54d
parent 13846 1bf1e7a7554a
child 13849 01e27cdbf2bb
--- a/Object.st	Mon Dec 05 11:16:31 2011 +0100
+++ b/Object.st	Mon Dec 05 11:43:47 2011 +0100
@@ -12,20 +12,20 @@
 "{ Package: 'stx:libbasic' }"
 
 nil subclass:#Object
-        instanceVariableNames:''
-        classVariableNames:'ErrorSignal HaltSignal MessageNotUnderstoodSignal
-                UserInterruptSignal RecursionInterruptSignal
-                ExceptionInterruptSignal SubscriptOutOfBoundsSignal
-                IndexNotFoundSignal NonIntegerIndexSignal NotFoundSignal
-                KeyNotFoundSignal ElementOutOfBoundsSignal UserNotificationSignal
-                InformationSignal WarningSignal PrimitiveFailureSignal
-                DeepCopyErrorSignal AbortSignal ErrorRecursion Dependencies
-                InfoPrinting ActivityNotificationSignal InternalErrorSignal
-                NonWeakDependencies SynchronizationSemaphores ObjectAttributes
-                OSSignalInterruptSignal FinalizationLobby
-                RecursiveStoreStringSignal AbortAllSignal EnabledBreakPoints'
-        poolDictionaries:''
-        category:'Kernel-Objects'
+	instanceVariableNames:''
+	classVariableNames:'ErrorSignal HaltSignal MessageNotUnderstoodSignal
+		UserInterruptSignal RecursionInterruptSignal
+		ExceptionInterruptSignal SubscriptOutOfBoundsSignal
+		IndexNotFoundSignal NonIntegerIndexSignal NotFoundSignal
+		KeyNotFoundSignal ElementOutOfBoundsSignal UserNotificationSignal
+		InformationSignal WarningSignal PrimitiveFailureSignal
+		DeepCopyErrorSignal AbortSignal ErrorRecursion Dependencies
+		InfoPrinting ActivityNotificationSignal InternalErrorSignal
+		NonWeakDependencies SynchronizationSemaphores ObjectAttributes
+		OSSignalInterruptSignal FinalizationLobby
+		RecursiveStoreStringSignal AbortAllSignal EnabledBreakPoints'
+	poolDictionaries:''
+	category:'Kernel-Objects'
 !
 
 !Object class methodsFor:'documentation'!
@@ -525,6 +525,9 @@
     "Modified: 23.4.1996 / 16:00:07 / cg"
 ! !
 
+
+
+
 !Object methodsFor:'Compatibility-Dolphin'!
 
 stbFixup: anSTBInFiler at: newObjectIndex
@@ -686,6 +689,7 @@
     "
 ! !
 
+
 !Object methodsFor:'accessing'!
 
 _at:index
@@ -1696,6 +1700,7 @@
 ! !
 
 
+
 !Object methodsFor:'change & update'!
 
 broadcast:aSelectorSymbol
@@ -1910,46 +1915,6 @@
 %}
 !
 
-caseOf:aCollection
-    "lookup myself in aCollection.
-     If the key matches, answer the value.
-     aCollection is typically a Collection of Associations
-     or a Dictionary.
-
-     If the key is not present, raise an exception."
-
-    ^ self caseOf:aCollection otherwise:[KeyNotFoundError raiseWith:self].
-
-    "
-        1 caseOf:{ 1 -> 'one'. 2 -> 'two'. }
-
-        2 caseOf: (Dictionary withKeysAndValues:#(1 'one' 2 'two')) 
-        3 caseOf: (Dictionary withKeysAndValues:#(1 'one' 2 'two'))
-    "
-!
-
-caseOf:aCollection otherwise:otherwiseBlock
-    "lookup myself in aCollection.
-     If the key matches, answer the value.
-     aCollection is typically a Collection of Associations
-     or a Dictionary.
-
-     If the key is not present, answer the value of otherwiseBlock."
-
-    aCollection associationsDo:[:each|
-         self = each key ifTrue:[^ each value].
-    ].
-
-    ^ otherwiseBlock value.
-
-    "
-        1 caseOf:{ 1 -> 'one'. 2 -> 'two'. } otherwise:'unknown'
-
-        2 caseOf: (Dictionary withKeysAndValues:#(1 'one' 2 'two')) otherwise:'unknown'
-        3 caseOf: (Dictionary withKeysAndValues:#(1 'one' 2 'two')) otherwise:'unknown'
-    "
-!
-
 deepSameContentsAs:anObject
     "return true, if the receiver and the arg have the same contents
      in both the named instance vars and any indexed instVars.
@@ -4296,7 +4261,11 @@
         Smalltalk isStandAloneApp ifTrue:[
             (ex signal == NoHandlerError and:[HaltInterrupt handles:ex unhandledException]) ifTrue:[
                 "/ 'Halt ignored' infoPrintCR.
-                ^ self
+                ^ nil
+            ].
+            (ex signal == UserInterrupt) ifTrue:[
+                ex description errorPrintCR.
+                Smalltalk exit.
             ].
         ].
 
@@ -4384,7 +4353,7 @@
         withMessage:ex descriptionForDebugger
         mayProceed:(ex mayProceed).
 
-    "Modified: / 06-12-2006 / 18:51:55 / cg"
+    "Modified: / 05-12-2011 / 11:40:49 / cg"
 !
 
 primitiveFailed
@@ -7277,7 +7246,6 @@
     ^ self
 ! !
 
-
 !Object methodsFor:'secure message sending'!
 
 ?: selector
@@ -9489,7 +9457,7 @@
 !Object class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.681 2011-12-05 08:59:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.682 2011-12-05 10:43:47 cg Exp $'
 !
 
 version_SVN