Not Jacque for sure, she is lots smarter than I, but that is how I tend to set these types of situations up.dunbarx wrote:@Jacque. I am misunderstanding something. Or did you intend that the handlers for both the field and the "Cancel" button both live in the card or stack scripts? In that case, script locals would indeed do. I assumed that the "Cancel" button has its own handlers; it is just the way I normally see such a pivotal gadget.
If there is something that I need to code specifically to one control of type x, and a few general things for all controls of type x, the one specific thing goes into control x's script with a pass event, everything else that is as general as I can make it goes at the card level if I am only running one stack, the stack level if there are substacks.
I also follow her reasoning on the script local variables, although I am not as stringent on custProps (but then, I don't use them a lot in any case). I believe that there is a lesson that outlines that same logic, and although new around here, I haven't seen fault with it yet.
BTW, just to be clear, I am not maligning globals, obviously they have a place, else the great an benevolent creators wouldn't have created them. Either that, or the g.a.b.c. were drinking way too much at the time...