WindowBuilder.st
changeset 4070 54520fdc9e29
parent 3776 3450a77da035
child 4097 662d9ae4818f
--- a/WindowBuilder.st	Tue Feb 20 18:42:56 2018 +0100
+++ b/WindowBuilder.st	Tue Feb 20 18:44:24 2018 +0100
@@ -240,7 +240,9 @@
     aSymbol notNil ifTrue:[
         bindings notNil ifTrue:[
             b := bindings at:aSymbol ifAbsent:nil.
-            b notNil ifTrue:[^ b].
+            b notNil ifTrue:[
+                ^ b
+            ].
         ].
 
         application notNil ifTrue:[
@@ -254,14 +256,14 @@
                 in:[
                     ^ application class aspectFor:aSymbol
                 ].
-
-            ^ exceptionBlock value.
         ]
     ].
-    ^ nil
+
+    ^ exceptionBlock value.
 
     "Created: / 04-08-1998 / 19:28:30 / cg"
     "Modified: / 25-07-2011 / 15:29:25 / cg"
+    "Modified (format): / 20-02-2018 / 11:36:07 / stefan"
 !
 
 aspectAt:aSymbol put:aModel
@@ -284,6 +286,17 @@
     ^ nil
 !
 
+bindingAt:aSymbol ifAbsentPut:anAspectOrBlock
+    "return the binding for a symbol or nil if there is none"
+
+    bindings isNil ifTrue:[
+        bindings := IdentityDictionary new
+    ].
+    ^ bindings at:aSymbol ifAbsentPut:anAspectOrBlock.
+
+    "Created: / 20-02-2018 / 09:59:56 / stefan"
+!
+
 bindings
     "return my bindings"
 
@@ -1047,14 +1060,16 @@
     |b|
 
     bindings notNil ifTrue:[
-	b := bindings at:aKey ifAbsent:nil.
-	b notNil ifTrue:[^ b].
+        b := bindings at:aKey ifAbsent:nil.
+        b notNil ifTrue:[^ b].
     ].
 
     ^ self
-	safelyPerform:#aspectFor:
-	with:aKey
-	ifNone:[ self aspectAt:aKey ]
+        safelyPerform:#aspectFor:
+        with:aKey
+        ifNone:[ self aspectAt:aKey ]
+
+    "Modified: / 20-02-2018 / 12:43:57 / stefan"
 !
 
 aspectFor:aKey ifAbsent:exceptionBlock