--- a/WindowBuilder.st Tue Feb 25 14:25:19 1997 +0100
+++ b/WindowBuilder.st Tue Feb 25 14:29:49 1997 +0100
@@ -83,7 +83,9 @@
].
application notNil ifTrue:[
- ^ application aspectFor:aSymbol
+ Object messageNotUnderstoodSignal catch:[
+ ^ application aspectFor:aSymbol
+ ]
].
^ nil
@@ -99,6 +101,13 @@
"Modified: 17.1.1997 / 19:28:37 / cg"
!
+bindingAt:aSymbol
+ bindings notNil ifTrue:[
+ ^ bindings at:aSymbol ifAbsent:nil.
+ ].
+ ^ nil
+!
+
bindings
^ bindings
!
@@ -108,15 +117,15 @@
!
componentAt:name
- bindings isNil ifTrue:[^ nil].
- ^ bindings at:name ifAbsent:nil
+ namedComponents isNil ifTrue:[^ nil].
+ ^ namedComponents at:name asSymbol ifAbsent:nil
!
componentAt:name put:aComponent
- bindings isNil ifTrue:[
- bindings := IdentityDictionary new.
+ namedComponents isNil ifTrue:[
+ namedComponents := IdentityDictionary new.
].
- bindings at:name put:aComponent
+ namedComponents at:name asSymbol put:aComponent
!
componentCreationHook:something
@@ -129,7 +138,7 @@
!
namedComponents
- ^ bindings
+ ^ namedComponents
!
source
@@ -189,6 +198,12 @@
!WindowBuilder methodsFor:'spec creation aspect fetch'!
actionFor:aKey
+ "return an action for aKey. This is invoked during window building
+ (by the builder) to ask for an ActionButtons actionBlock.
+ Here, first the local bindings are searched, then the application and
+ finally the applications class is asked for a corresponding action.
+ The returned object is typically a block."
+
|b|
bindings notNil ifTrue:[
@@ -197,7 +212,9 @@
].
application notNil ifTrue:[
- ^ application actionFor:aKey
+ Object messageNotUnderstoodSignal catch:[
+ ^ application actionFor:aKey
+ ]
].
applicationClass notNil ifTrue:[
(applicationClass respondsTo:#actionFor:) ifTrue:[
@@ -210,6 +227,12 @@
!
aspectFor:aKey
+ "return a model for aKey. This is invoked during window building
+ (by the builder) to ask for an Editfields, a Toggles etc. model.
+ Here, first the local bindings are searched, then the application and
+ finally the applications class is asked for a corresponding action.
+ The returned object is typically a valueHolder."
+
|b|
bindings notNil ifTrue:[
@@ -218,7 +241,9 @@
].
application notNil ifTrue:[
- ^ application aspectFor:aKey
+ Object messageNotUnderstoodSignal catch:[
+ ^ application aspectFor:aKey
+ ]
].
applicationClass notNil ifTrue:[
(applicationClass respondsTo:#aspectFor:) ifTrue:[
@@ -231,10 +256,18 @@
!
componentFor:aKey
+ "return a component for aKey. This is invoked during window building
+ (by the builder) to ask for an ArbitraryComponents view.
+ Here, first the local bindings are searched, then the application and
+ finally the applications class is asked for a corresponding action.
+ The returned object is typically a view."
+
|cls|
application notNil ifTrue:[
- ^ application componentFor:aKey
+ Object messageNotUnderstoodSignal catch:[
+ ^ application componentFor:aKey
+ ]
].
applicationClass notNil ifTrue:[
(applicationClass respondsTo:#componentFor:) ifTrue:[
@@ -246,10 +279,18 @@
!
labelFor:aKey
+ "return a label for aKey. This is invoked during window building
+ (by the builder) to ask for a ???'s label.
+ Here, first the local bindings are searched, then the application and
+ finally the applications class is asked for a corresponding action.
+ The returned object is typically a string."
+
|cls|
application notNil ifTrue:[
- ^ application labelFor:aKey
+ Object messageNotUnderstoodSignal catch:[
+ ^ application labelFor:aKey
+ ]
].
applicationClass notNil ifTrue:[
(applicationClass respondsTo:#labelFor:) ifTrue:[
@@ -261,8 +302,16 @@
!
listFor:aKey
+ "return a list for aKey. This is invoked during window building
+ (by the builder) to ask for a ???'s label.
+ Here, first the local bindings are searched, then the application and
+ finally the applications class is asked for a corresponding action.
+ The returned object is typically a list."
+
application notNil ifTrue:[
- ^ application listFor:aKey
+ Object messageNotUnderstoodSignal catch:[
+ ^ application listFor:aKey
+ ]
].
applicationClass notNil ifTrue:[
(applicationClass respondsTo:#listFor:) ifTrue:[
@@ -435,5 +484,5 @@
!WindowBuilder class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.25 1997-02-18 10:09:36 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.26 1997-02-25 13:29:49 ca Exp $'
! !