User Tools

Site Tools


assignbuffertoleft_copy_from_buffer_fields_to_left_fields_.htm
Navigation:  ABC Library Reference > BufferedPairsClass > BufferedPairsClass Methods >====== AssignBufferToLeft (copy from “buffer” fields to “left” fields) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

AssignBufferToLeft

blk2blue.jpg

The AssignBufferToLeft method copies the contents of each “buffer” field to its corresponding “left” 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.AssignRightToLeft       !copy changes to CUST (write) buffer

 OF BUTTON:Yes

  Fields.AssignBufferToLeft      !restore original to CustQ (display) buffer

 END

END

See Also:     AddPair, RealList

assignbuffertoleft_copy_from_buffer_fields_to_left_fields_.htm.txt · Last modified: 2021/04/15 15:56 by 127.0.0.1