Can I have some advice on how to set up handlers.
I plan to have 30 or 40 stacks that are identical except for the contents
of the fields. Each one will have the same four fields and seven or eight
buttons. I know that the scripts are bound to change over time. Should I:
1. Put detailed scripts in each control. Then when I want to change them, I
will change them on a template stack and have a button that goes through
all the stacks and sets the script of each control to the script of the
corresponding control in the template stack.
2. Put a handler name in each control with the handler in a stack that I
will insert in the back. Then I will just have to change the script for
that handler and can presumably live with the handler name forever, even if
the original purpose of the handler changes. This is what I used to do in
HyperCard palettes, which were some trouble to change.
3. Put nothing in each control. In a stack that I will insert in the back I
will determine the target of each mouseup and call a handler depending on
the name of the target.
As far as I can see all of these methods will work.
Method 3 is perhaps slower, but I assume the difference would be
inconsequential. It also seems somehow contrary to the spirit of how this
kind of scripting should work. By the same logic, you need never put
scripts in any specific controls, but instead just check all messages as
part of one massive script in the back.
Any thoughts would board appreciated.
Bruce
--
Bruce Lewis
Lewis & Collyer
160 John Street, Suite 401
Toronto, Ontario
Canada M5V 2E5
(416) 598-4357
FAX (416) 598-1067
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]