#REFACTORING
class: ApplicationModel
added: #aspectValueOr:for:
comment/format in: #aspectValueFor:
--- 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