[comp.sys.mac.hypercard] How to tell what field is active?

mxmora@unix.SRI.COM (Matt Mora) (02/02/91)

I have a question that I believe is real simple but I can't
figure it out. I have a stack that is an interface for a VAX/GESCAN
system that uses mactcp. It has a main field which displays what comes
from the VAX and another field that is used as the command line. I would
like the command line to always be active. The problem is that anytime
data comes from the vax hypercard makes that the active field. How
do I detect what is the active field? If the active field is not
my command line I want to make it active.

What I need is something like this:

on idle
  check to see if data needs to be displayed and the display it
  check which field active
  if active field is not command line then make command line field active
  do other Idle stuff
end idle

I tried various things like using a global to check whether data has been
processed and assuming that if so the the command line is not active so make
it active. 

The problem is that data might be coming in as the user is typing the next 
command so what ever is used to make sure that the field is active, it can
not change the selection or insersion point of the command field.

This is real simple right?

There must be some property that can tell me the currently active field.


Thanks


Matt

-- 
___________________________________________________________
Matthew Mora                |  my Mac  Matt_Mora@QM.SRI.COM
SRI International           |  my SUN   mxmora@unix.sri.com
___________________________________________________________