resources
authorca
Thu, 25 Jul 2002 18:40:14 +0200
changeset 1585 0b9acf055c3c
parent 1584 1643bdbd15e2
child 1586 4dd7b087fab8
resources and messageNotUnderstood stuff
WindowBuilder.st
--- a/WindowBuilder.st	Thu Jul 25 18:38:54 2002 +0200
+++ b/WindowBuilder.st	Thu Jul 25 18:40:14 2002 +0200
@@ -205,16 +205,18 @@
 
 applicationClass
     "return the value of the instance variable 'applicationClass' (automatically generated).
-     This is a private interface for the UIPainter to pass down the app-class
-     to the specs when editing."
+     WARNING:
+        This is a private interface for the UIPainter to pass down the app-class
+        to the specs when editing."
 
     ^ applicationClass 
 !
 
 applicationClass:something
     "set the value of the instance variable 'applicationClass' (automatically generated).
-     This is a private interface for the UIPainter to pass down the app-class
-     to the specs when editing."
+     WARNING:
+         This is a private interface for the UIPainter to pass down the app-class
+         to the specs when editing."
 
     applicationClass := something.
 !
@@ -241,20 +243,16 @@
         ].
 
         application notNil ifTrue:[
-            Object messageNotUnderstoodSignal handle:[:ex |
-                ex parameter selector == aSymbol ifFalse:[
-                    ex reject
-                ]
-            ] do:[
-                ^ application aspectFor:aSymbol
-            ].
-            Object messageNotUnderstoodSignal handle:[:ex |
-                ex parameter selector == aSymbol ifFalse:[
-                    ex reject
-                ]
-            ] do:[
-                ^ application class aspectFor:aSymbol
-            ].
+            MessageNotUnderstood 
+                ignoreNotUnderstoodOf:aSymbol
+                in:[
+                    ^ application aspectFor:aSymbol
+                ].
+            MessageNotUnderstood 
+                ignoreNotUnderstoodOf:aSymbol
+                in:[
+                    ^ application class aspectFor:aSymbol
+                ].
 
             ^ exceptionBlock value.
         ]
@@ -492,6 +490,13 @@
     ^ namedComponents
 !
 
+resources
+    application notNil ifTrue:[
+        ^ application resources
+    ].
+    ^ Dialog classResources.
+!
+
 subCanvasAt:majorKey at:minorKey
     "get the subCanvas or subSpec specification from major and minor key.
      Here, we first look for a spec in the private subCanvasSpecs dictionary,
@@ -533,12 +538,9 @@
     ].
 
     cls notNil ifTrue:[
-        Object messageNotUnderstoodSignal handle:[:ex|] do:[
+        MessageNotUnderstood catch:[
             ^ cls specificationFor:minorKey
         ].
-        Object messageNotUnderstoodSignal handle:[:ex|] do:[
-            ^ cls perform:minorKey.
-        ]
     ].
     ^ nil
 !
@@ -735,17 +737,21 @@
                         ].
 
         application notNil ifTrue:[
-            application messageNotUnderstoodSignal handle:handlerBlock do:[
+            MessageNotUnderstood handle:handlerBlock do:[
                 ^ application perform:aSelector
             ].
             cls := application class.
 
-            cls messageNotUnderstoodSignal handle:handlerBlock do:[
+            MessageNotUnderstood handle:handlerBlock do:[
                 ^ cls perform:aSelector
             ]
         ].
+        "
+         WARNING:
+            This is a private interface for the UIPainter to pass down the app-class
+        "
         applicationClass notNil ifTrue:[
-            applicationClass messageNotUnderstoodSignal handle:handlerBlock do:[
+            MessageNotUnderstood handle:handlerBlock do:[
                 ^ applicationClass perform:aSelector
             ]
         ]
@@ -772,17 +778,21 @@
                         ].
 
         application notNil ifTrue:[
-            application messageNotUnderstoodSignal handle:handlerBlock do:[
+            MessageNotUnderstood handle:handlerBlock do:[
                 ^ application perform:aSelector with:anArgument
             ].
             cls := application class.
 
-            cls messageNotUnderstoodSignal handle:handlerBlock do:[
+            MessageNotUnderstood handle:handlerBlock do:[
                 ^ cls perform:aSelector with:anArgument
             ]
         ].
+        "
+         WARNING:
+            This is a private interface for the UIPainter to pass down the app-class
+        "
         applicationClass notNil ifTrue:[
-            applicationClass messageNotUnderstoodSignal handle:handlerBlock do:[
+            MessageNotUnderstood handle:handlerBlock do:[
                 ^ applicationClass perform:aSelector with:anArgument
             ].
         ]
@@ -809,17 +819,21 @@
                         ].
 
         application notNil ifTrue:[
-            application messageNotUnderstoodSignal handle:handlerBlock do:[
+            MessageNotUnderstood handle:handlerBlock do:[
                 ^ application perform:aSelector with:arg1 with:arg2
             ].
             cls := application class.
 
-            cls messageNotUnderstoodSignal handle:handlerBlock do:[
+            MessageNotUnderstood handle:handlerBlock do:[
                 ^ cls perform:aSelector with:arg1 with:arg2
             ]
         ].
+        "
+         WARNING:
+            This is a private interface for the UIPainter to pass down the app-class
+        "
         applicationClass notNil ifTrue:[
-            applicationClass messageNotUnderstoodSignal handle:handlerBlock do:[
+            MessageNotUnderstood handle:handlerBlock do:[
                 ^ applicationClass perform:aSelector with:arg1 with:arg2
             ].
         ]
@@ -993,9 +1007,10 @@
      finally the applications class is asked for a corresponding interfaceSPec.
      The returned object is typically an interfaceSpec array."
 
-    ^ self safelyPerform:#specificationFor:
-                    with:aKey
-                  ifNone:[ self aspectFor:aKey ]
+    ^ self 
+        safelyPerform:#specificationFor:
+        with:aKey
+        ifNone:[ self aspectFor:aKey ]
 ! !
 
 !WindowBuilder methodsFor:'spec creation callbacks'!
@@ -1289,5 +1304,5 @@
 !WindowBuilder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.97 2002-05-03 17:58:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.98 2002-07-25 16:40:14 ca Exp $'
 ! !