EqualBuffer (detect record buffer changes)

Top  Previous  Next

 

EqualBuffer( buffer id ), VIRTUAL

EqualBuffer

Compares the managed file's record buffer with the specified buffer and returns a value indicating whether the buffers are equal.

buffer id

An integer constant, variable, EQUATE, or expression that identifies the buffer contents to compare--typically a value returned by the SaveBuffer method.

The EqualBuffer method compares the managed file's record buffer, including any MEMOs or BLOBs, with the specified buffer and returns a value indicating whether the buffers are equal. A return value of one (1 or True) indicates the buffers are equal; a return value of zero (0 or False) indicates the buffers are not equal. Assigning PROP:Handle on a BLOB field constitutes a change to the BLOB and will cause EqualBuffer() to return False.

Return Data Type:     BYTE

Example:

MyWindowManager.TakeCloseEvent PROCEDURE

CODE

IF SELF.Response = RequestCancelled            !if end user cancelled the form

 IF ~SELF.Primary.Me.EqualBuffer(SELF.Saved)   !check for any pending changes

  !handle cancel of pending changes

 END

END

See Also:     SaveBuffer