where to put handlers?

Mark Schonewille m.schonewille at economy-x-talk.com
Tue Feb 5 19:05:16 EST 2008


Hi Sadhunathan Nadesan,

A lot of projects that are sent to me are unnecessarily complex  
because people try to be "smart", putting handlers in weird places.  
After 2 decades of programming with HyperCard and later Revolution,  
I've come to the conclusion that it is a good idea to put handlers as  
low as possible in the hierarchy. Only if a handler, or a part of a  
handler, is used more than once, I put that handler higher up the  
hierarchy. If I need only a part of a handler more than once, I make  
a new handler with that particular part higher up the hierarchy. If a  
handler is very short, I often put it in a button or field itself,  
even if I need it more than once. In my view, xTalk is not about  
programming "smart" but about programming quickly and effectively  
(which is also smart, but different). Therefore, I'd say Sarah is right.


Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Quickly extract data from your HyperCard stacks with DIFfersifier.  
http://differsifier.economy-x-talk.com


Op 6-feb-2008, om 0:49 heeft Sadhunathan Nadesan het volgende  
geschreven:
>
> With true respect, I would like to suggest an alternative approach,
> the reverse.  Place handlers as high as posssible, such as in the
> stack script.
>



More information about the use-livecode mailing list