--- a/ButtonController.st Fri Jan 24 15:32:29 1997 +0100
+++ b/ButtonController.st Fri Jan 24 15:39:40 1997 +0100
@@ -44,6 +44,31 @@
access to the controllers behavior is possible via messages to the button.
(setting actions, controlling autorepeat etc.)
+ A ButtonController supports 3 types of notifications:
+ MVC change notification - as usual
+ channel notifications - through the pressChannel/releaseChannels
+ action callBack - through pressAction / releaseAction blocks.
+
+ Notifications are made in the above order (i.e. an actionBlock sees the model
+ already changed, if there is a model).
+
+ Having multiple mechanisms here is both historic and to make the life
+ of simple applications easier - most buttons dont need a model or notification
+ channels and simply perform some action.
+ In general: actionBlocks are useful, if there is a single subject which
+ needs to be told about the press (i.e. actionButtons);
+ models should be used when the button represents some value in some other
+ object.
+ Channels are much like the MVC approach, however, these are useful if
+ press/release/label etc. may come from different objects, and a single
+ (synthetic) model does not make sense or is not appropriate.
+
+ Actually, the channels are the most general - and the other mechanism could
+ (and will, maybe) based upon them; after all, an actionBlock is a channel,
+ whcih sends #value to its block ....
+
+
+
See examples in the Button class.
[Instance variables:]
@@ -604,5 +629,5 @@
!ButtonController class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.36 1997-01-24 14:32:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.37 1997-01-24 14:39:40 cg Exp $'
! !