Why is this record being saved? -- A simple test

Barry Wiseman barry at gensoftdes.com
Tue Mar 21 11:15:06 PST 2006


OK, this is bugging me now.  Please try this at home, kids:

Test map:

	Field One: 10::
	Field Two: 10::
	Field Three: 10::

Screen 0:

	  Field One: *1
	  Field Two: !2
	Field Three: !3

Screen 1:

	  Field One: *1
	  Field Two: *2
	Field Three: *3

Input processing:

	::end:
	@KEYT::popup update -,"1":
	:@sk eq "BRKY":clearp; end:
	::write; end:
	@WLF2::3="Updated"; display; end:

1) Run "*clerk test -s0".  Stand on a blank record and try the following:

	Press "T", type some characters into field one.
	Press BREAK.  The field one data is discarded, leaving the record unchanged.

2) Next test:

	Now press "T", ENTER, ENTER.  The word "Updated" appears in field 3.
	Press BREAK.  The record is rewritten, with "Updated" in field 3.

3) Now try this:

	Same first three keystrokes, but press CLEF to erase the word "Updated".
	Now field 3 is blank.  Press BREAK.
	Screen 0 is redrawn with the word "Updated" in field 3.

4) Final test:

	Same as test 3, except after blanking field 3 on the popup screen,
	press SAVE instead of BREAK.
	Only then does the word "Updated" go away in the saved record.

It appears the record is being rewritten on the fly at the moment the @WLF code 
writes data to a field!  Note that this is not the behavior with data entered on the 
popup screen from the keyboard (see test 1).

I can only say, HUH???

Is this because filePro knows the record I'm standing on is the same record I'm POPUP 
UPDATE'ing, and is taking steps behind the curtains to try and keep everything in 
sync?  But no update is ever requested, either for the record clerk is standing on or 
for the image of it in the POPUP UPDATE.  Grrrrr.

Linux dclerk 5.0.14D4.

-----------------------------------------------------------------
  Barry Wiseman                              barry at gensoftdes.com
  Genesis Software Designs, Inc.            Voice: (212) 889-9191
  18 E. 41 Street, New York, NY 10017         Fax: (212) 889-1589
-----------------------------------------------------------------



More information about the Filepro-list mailing list