AssignRightToBuffer (copy from "right" fields to "buffer" fields)

Top  Previous  Next

 

AssignRightToBuffer

The AssignRightToBuffer method copies the contents of each "right" field to its corresponding "buffer" field in the RealList property.

Implementation:

The "left" field is the first (left) parameter of the AddPair method. The "right" field is the second (right) parameter of the AddPair method. The BufferedPairsClass automatically supplies the "buffer" field.

Example:

Fields.AddPair(CUST:Name,  CustQ.Name)  !establish Name pair

Fields.AddPair(CUST:Phone, CustQ.Phone) !establish Phone pair

Fields.AddPair(CUST:ZIP,   CustQ.ZIP)   !establish ZIP pair

!some code

IF ~Fields.EqualRightBuffer             !compare QUEUE fields to save buffer

 CASE MESSAGE('Abandon Changes?',,,BUTTON:Yes+BUTTON:No)

 OF BUTTON:No

  Fields.AssignRightToBuffer

 OF BUTTON:Yes

  Fields.AssignBufferToRight

 END

END

See Also:     AddPair, RealList