Why is this record being saved? -- A simple test
Barry Wiseman
duck at gensoftdes.com
Tue Mar 21 20:58:14 PST 2006
On Wed, 22 Mar 2006, filepro list wrote:
> > -----Original Message-----
> > From: filepro-list-bounces at lists.celestial.com
> > [mailto:filepro-list-bounces at lists.celestial.com] On Behalf
> > Of Barry Wiseman
> > Sent: Wednesday, 22 March 2006 5:15 AM
> > To: filePro list
> > Subject: Re: Why is this record being saved? -- A simple test
> >
> > OK, this is bugging me now. Please try this at home, kids:
>
> snip
>
> >
> > Input processing:
> >
> > ::end:
> > @KEYT::popup update -,"1":
> > :@sk eq "BRKY":clearp; end:
> > ::write; end:
> > @WLF2::3="Updated"; display; end:
> >
>
> Snip
>
> > 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.
> >
>
> @key processing is another entry point to update a record, regardless of if
> you actually change any values in the current record eg you do a lookup and
> update another file. Even if you don't change anything, the system
> maintained fields @ub/@ud will show the record has been updated, which it
> has, just not by pressing U to update. When the end is encountered the
> record is written away.
>
> Solution:
>
> If @sk eq "BRKY"
> Then clearp; pushkey "[BRKY]"; screen 1; end
>
Thanks, Shane, your suggestion works. (In my linux environment, I had to
pushkey "[BRKY][BRKY]").
However, your analysis doesn't explain why changes arising from @WLF
processing are "special", i.e., my test program does *not* update @ub
unless the @WLF code is triggered, and doesn't need the voodoo
you've provided in order to discard data changed from the keyboard.
Barry
More information about the Filepro-list
mailing list