Follow-up on show only browse
Richard Kreiss
rkreiss at verizon.net
Mon Sep 20 12:13:02 PDT 2010
> -----Original Message-----
> From: Kenneth Brody [mailto:kenbrody at spamcop.net]
> Sent: Monday, September 20, 2010 2:59 PM
> To: Richard Kreiss
> Cc: 'filePro Mailing List'
> Subject: Re: Follow-up on show only browse
>
> On 9/20/2010 2:13 PM, Richard Kreiss wrote:
> > After all the suggestions as to how to return to the original screen,
> > my client asked today if their users could have the old method back.
> > What she meant by that was that if the enter key was pressed the next
> > record should come up with the browse open.
> >
> > With all the suggestions that have been made, this became a rather
> > easy requested to fill. I added the following code:
> >
> > If:
> > Then: qq=waitkey
> > If: qq = "" and @sk="ENTR"
> > Then: pushkey "[ENTR"]9";end
> > If: qq = "" and @sk="CDWN"
> > Then: pushkey "[CDWN"]9";end
> > If: qq = "" and @sk="CRUP"
> > Then: pushkey "[CRUP"]9";end
> > If:
> > Then: END
> >
> > The above program returns the enter up arrow and down arrow keys to
> > their original function.
>
> Note that the qq="" test on each line is unnecessary.
>
> Also, I assume the above code is not copy-pasted from the actual code,
since
> your pushkeys all have the same syntax error / typo.
Yes
>
> Next, what happens if the press something other than the three keystrokes
> you check for? Your code simply throws it out, and returns to @entsel.
>
> Finally, a common shortcut technique for such checks would be:
>
> if: "|ENTR|CDWN|CRUP|" co ("|" & @SK & "|")
> then: pushkey "[" & @SK & "]9" ; end
> if: ''' None of the above.
> then: ''' What should go here?
Switchto (sn) set prior to the browse being
displayed
> if:
> then: end
>
Actually, if anything other than a number is pressed the browse should clear
and the user remains on the current screen.
In fact this situation can arise if ENTR is pressed and a record is hit with
no transactions. An error message advises "No Transactions On File" and the
ends the program. This leaves the user on screen 9 with no browse. Now I
could add :sn="":sn="2" and then switchto (sn) would not leave them on a
blank screen.
John suggest doing pushkey "["{@sk{"[9";end which works.
Richard
> --
> Kenneth Brody
More information about the Filepro-list
mailing list