[comp.sys.mac.hypercard] How can I get a field to sense activity?

jlc@atux01.UUCP (J. Collymore) (03/27/89)

I hope some one out there can tell me if this is possible, and if not, I hope
that those of you from Apple that see this will incorporate it into your next
release.

THE SITUATION:
I have a card with a field that holds data.  Whenever a user alters any
information in that field, I want the Time/Date field on the card updated to
reflect the time and date of the data alteration.

Checking for mouseClicks and mouseEnters doesn't seem to work in field scripts,
and putting a button behind the data field prevents the user from entering data.

Can any of you out there offer any suggestions on how I might accomplish this?

Thank you for your help.

						Jim Collymore

jdevoto@Apple.COM (Jeanne A. E. DeVoto) (04/09/89)

In article <1052@atux01.UUCP> jlc@atux01.UUCP (J. Collymore) writes:
>I have a card with a field that holds data.  Whenever a user alters any
>information in that field, I want the Time/Date field on the card updated to
>reflect the time and date of the data alteration.

The closeField message is sent to a field when 1) the user exits the field
by clicking elsewhere or tabbing to the next field and 2) the data in the
field has changed. So

  on closeField
    put the date && the time into background field "Date/Time"
  end closeField

will do what you want.

jeanne a. e. devoto
jdevoto@apple.com