WinBuilder.st
changeset 716 a23d48401446
parent 707 424bb7ca69eb
child 717 b89142a61d05
equal deleted inserted replaced
715:bedd651e731c 716:a23d48401446
   443     ^ []
   443     ^ []
   444 
   444 
   445     "Created: 17.1.1997 / 21:08:22 / cg"
   445     "Created: 17.1.1997 / 21:08:22 / cg"
   446 !
   446 !
   447 
   447 
       
   448 actionFor:aKey withValue:aValue
       
   449     "return an action for aKey/value combonation. 
       
   450      This is invoked during window building
       
   451      (by the builder) to ask for an ActionButtons actionBlock if that button
       
   452      specified an action with an argument value.
       
   453      Here, first the local bindings are searched, then the application and
       
   454      finally the applications class is asked for a corresponding action.
       
   455      The returned object is typically a block."
       
   456 
       
   457     |b|
       
   458 
       
   459     bindings notNil ifTrue:[
       
   460         b := bindings at:aKey ifAbsent:nil.
       
   461         b notNil ifTrue:[^ b].
       
   462     ].
       
   463 
       
   464     application notNil ifTrue:[
       
   465         Object messageNotUnderstoodSignal handle:[:ex |
       
   466             Transcript showCR:'not understood: ' , aKey.
       
   467         ] do:[
       
   468             ^ application actionFor:aKey withValue:aValue
       
   469         ]
       
   470     ].
       
   471     applicationClass notNil ifTrue:[
       
   472         (applicationClass respondsTo:#actionFor:withValue:) ifTrue:[
       
   473             ^ applicationClass actionFor:aKey  withValue:aValue
       
   474         ]
       
   475     ].
       
   476     ^ [:dummy | ]
       
   477 
       
   478     "Created: 17.1.1997 / 21:08:22 / cg"
       
   479 !
       
   480 
   448 aspectFor:aKey
   481 aspectFor:aKey
   449     "return a model for aKey. This is invoked during window building
   482     "return a model for aKey. This is invoked during window building
   450      (by the builder) to ask for an Editfields, a Toggles etc. model.
   483      (by the builder) to ask for an Editfields, a Toggles etc. model.
   451      Here, first the local bindings are searched, then the application and
   484      Here, first the local bindings are searched, then the application and
   452      finally the applications class is asked for a corresponding action.
   485      finally the applications class is asked for a corresponding action.
   752 ! !
   785 ! !
   753 
   786 
   754 !WindowBuilder class methodsFor:'documentation'!
   787 !WindowBuilder class methodsFor:'documentation'!
   755 
   788 
   756 version
   789 version
   757     ^ '$Header: /cvs/stx/stx/libview2/Attic/WinBuilder.st,v 1.50 1997-10-15 10:55:40 ca Exp $'
   790     ^ '$Header: /cvs/stx/stx/libview2/Attic/WinBuilder.st,v 1.51 1997-10-23 13:36:34 ca Exp $'
   758 ! !
   791 ! !