[comp.sys.mac.hypercard] How do I stay in a field -- Help needed

liren@leland.Stanford.EDU (Liren Chen) (05/19/91)

I am making a stack which displays an instruction field when a field is opened.
The way I do that is to put show field command in the openField handler, and
hide field in the closeField and exitField handlers.  The problem is that 
when a hidden field is shown, the card seems to excecute an exit field action,
which hides the field again.  This unexpected exitField message also causes
me other problems.  The way I solve it is to use a global variable (justOpen).
Before showing the field, I set justOpen to true, and set it to false before
exiting openField handler.  in exitField, I check justOpen and exit immediately
if it is true.  This seem to be fine, but I don't think it is very elegant.
Does somebody know a better way?

Another question:  I would like to use some fairly large variables (up to
2000 characters, say) to be passed between certain handlers.  The obviouse
way is to declair them as global.  But then they will stay in the memory all
the time, even if I only need them in a short period of operation.  I am afraid
that as my programing goes on, the global variables will be out of control
and take too much memory.  Is there a solution to this problem?

By the way, I use HyperCard 2.0.

If you would like to help, I would appreciate that you send a copy via
E-mail to me, because I don't follow the group daily.

Thanks in advance,  L. Chen