Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!sri-unix!stores From: stores@unix.SRI.COM (Matt Mora) Newsgroups: comp.sys.mac.hypercard Subject: Re: Checking for field changes Message-ID: <29463@sri-unix.SRI.COM> Date: 10 Apr 89 18:26:20 GMT References: <1100@atux01.UUCP> <89096.04:03:29.AXS101@PSUVM> <1114@atux01.UUCP> <1266@tellab5.tellabs.CHI.IL.US> Reply-To: stores@unix.sri.com (Matt Mora) Organization: SRI, Menlo Park, CA. Lines: 38 In article <1266@tellab5.tellabs.CHI.IL.US> kenk@tellab5.UUCP (Ken Konecki) writes: >In article <1114@atux01.UUCP> jlc@atux01.UUCP (J. Collymore) writes: >> HOWEVER, I want to be able to have the field >>sense either a mouseClick, or KeyClick so that it will be able to tell me when a >>user has modified (i.e., tampered with a data in that field)! >> >>If anyone can tell me how to do this I would REALLY appreciate it. Thanks > >The easiest way to check for field changes is to have a closeField >handler for the field: > on closeField > -- Do what you need to do when the field is changed > end closeField. > There is also a brute force way to do it. When the field is opened, copy the field into a buffer. When the card is closed check the buffer against the field to see if they are equal. Its ugly but it should work. On OpenField Global FieldBuff put field 1 into FieldBuff end openField On CloseField Global FieldBuff,FieldDirty if field 1 is equal to Fieldbuff then put false into FieldDirty else put true into FieldDirty end if End CloseField -- ___________________________________________________________ Matthew Mora SRI International stores@SRI.COM ___________________________________________________________