#REFACTORING
authorClaus Gittinger <cg@exept.de>
Thu, 29 Oct 2015 09:43:11 +0100
changeset 3515 6997e791c077
parent 3514 666702598f5c
child 3516 858a0b630ea1
child 3517 e65c4b28543e
#REFACTORING class: ApplicationModel added: #aspectValueOr:for: comment/format in: #aspectValueFor:
ApplicationModel.st
--- a/ApplicationModel.st	Thu Oct 29 09:33:18 2015 +0100
+++ b/ApplicationModel.st	Thu Oct 29 09:43:11 2015 +0100
@@ -1480,11 +1480,18 @@
     ^ nil
 !
 
-aspectValueFor:aKey
+aspectValueFor:aspectKeySymbol
     "fetch an aspect's value
      same as (self aspectFor:aKey) value"
 
-    ^ (self aspectFor:aKey) value
+    ^ (self aspectFor:aspectKeySymbol) value
+!
+
+aspectValueOr:default for:aspectKeySymbol
+    "common helper - fetches the aspect value; 
+     if it is nil, return a default."
+
+    ^ (self aspectValueFor:aspectKeySymbol) ? default
 !
 
 clientFor:aKey