show only browse

Richard Kreiss rkreiss at gccconsulting.net
Thu Sep 16 14:07:05 PDT 2010


Correction on my post:

Programming worked with the debugger on but not with it off.

At Ken's urging, I looked at this again to see if there was a simpler
solution.  There was using John's suggestion of @entsel processing.

I declared a variable atkeyf9(1,.0,g) in input processing.  When the @key9
processing runs, I set atkeyf9 = "9".  I needed to add SHOW"@" after the
browse command to keep it up.

When <enter> is pressed, @entsel processing checks:

If: atkeyf9="9"
Then: switchto (sn);atkeyf9="";end

This does work and is not as complex as I had made it.

Richard


> -----Original Message-----
> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
> Behalf Of Bruce Easton
> Sent: Thursday, September 16, 2010 1:40 PM
> To: filepro-list at lists.celestial.com
> Subject: Re: show only browse
> 
>   Wow - I am utterly amazed at how something so simple can wind up being
> so complex here for things that we have done for years.   I have done
> wild things with filepro automatic processing, browses, browse drop
> processing, key capturing, etc. over the years (often just to satisfy my
own
> curiosity - this is probably how I was eventually able to provide *mart
with a
> browse that showed where their moving vans were in the country on what
> dates and loaded with what job - somewhat graphical, but in char-based fp
> with lots of exit keys for different functions - hundreds of lines of
drop-
> processing - long before the 'switchto'
> command existed; and many other apps).
> 
> But after all these years, what I learned most is that the best is the
simplest.
> Or at least try not to dream up something overly complex to supercede
> something that filepro gives you (that you may have just
> forgotten) for very little effort.  Seems like my posts were ignored, but
for
> the sake of someone coming in here and looking for a very simple answer to
> the original question:
> 
> "I would like to have the user returned to their original screen if they
press
> <ENTER>. Nothing I have tried works."  for what was later described as
going
> to a screen where there is a show-only browse,
> 
> I will post it again (no If tests needed!   no automatic processing
> needed!  no key capturing needed! --use the command that's been around
> way before "switchto" - I use "switchto" all the time now, but not for
> this!!) - i'll even use your browse line and comment this time:
> 
> @key9 Then: sn=@sn     'take over key9 and first store orig screen name
>             Then: display 9    'display screen 9
>             Then: lookup tran = transaction K=16 i=E -Nxm b=(ba&bb&bc)
>             Then: show "@"    'let filepro ask the user to hit enter
>             Then: display (sn)  'put the orig screen back
>             Then: end
> 
> Very easy to understand and alter that piece of code, should say you
wanted
> to follow a new index.
> 
> Sorry, but I'm just dumbfounded by the responses to this.  Now if your
goal,
> Richard, has changed from your original question, then that's a different
> story and that would be a problem for me as I do not see in the follow-up
> posts any other requirements, but maybe I missed something.
> 
> Bruce
> 
> Bruce Easton
> STN, Inc.
> 
> 
> 
> On 9/16/10 12:39 PM, Richard Kreiss wrote:
> > With help for John and Ken, finally came up with the answer.
> >
> > 1. Capturing the auto processing table cycles.
> > 2. Set global dummy field sn at @key9 to sn=@sn prior to the switchto
"9"
> > 3. When the 4th cycle is hit, issue a switchto [sn] 4. At end of auto
> > processing table, issue a pushkey "[CRUP]" to move back one record.
> >
> > I found that the pushkey had to be at the end of the auto table to
> > execute properly.
> >
> > Thanks to all who responded.
> >
> > Richard
> >
> >
> >
> >>> The intercept is
> >>> really
> >>>> down to only two "if" lines I think and they are fairly
> >>> simple once you
> >>> see the
> >>>> idea. You will basically be catching all regular keys, and
> >>> all SPECIAL
> >>> keys
> >>>> ([ENTER], {CRUP], [CDWN], etc.) Then, you can deal with
> >>> anything the user
> >>>> presses, and even press a few things *for* them.
> >>> Already use @entsel to display the bottom prompts.
> >> That is the start.  The crucial thing is *intercepting" all the key
> > strokes
> >> @entsel and passing them through to INPUT as you want them passsed...
> >> Or not.  Showing the prompts is nice, but it doesn't gain you any
control.
> >>
> >> It's this kind of thing I'm talking about. You'd have to find the
> >> whole
> > article...
> >> Here is a main part of the idea though...
> >>
> >>
> >> 199  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
-
> > -
> >>         . If:
> >> .
> >>         Then: gosub legend 'put up the standard filePro prompts .
> >> 200  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
-
> > -
> >>         . If:
> >> .
> >>         Then: KeyPressed=waitkey
> >> .
> >> 201  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
-
> > -
> >>         . If: @sk eq "SAVE"
> >> .
> >>         Then: goto wait
> >> .
> >> 202  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
-
> > -
> >>         . If: @sk eq "CRUP" or @sk eq "CDWN" or @sk eq "UTAB" or @sk
> >> eq "DTAB"  .
> >>         Then: pushkey ""{"["{@sk{"]"{"[ENTR]"{"";  goto brw .
> >> 203  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
-
> > -
> >>         . If:
> >> .
> >>         Then: '
> >> .
> >> 204  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
-
> > -
> >> grp_1  . If: KeyPressed eq "A" or KeyPressed eq "M" or KeyPressed eq
"D"
> >> .
> >>         Then:
> >> .
> >>
> >>
> >>
> >> You can deal with the main filePro prompts/@keys and others of your
> >> own
> >>
> >>
> >> John
> >>
> >>
> >> _______________________________________________
> >> Filepro-list mailing list
> >> Filepro-list at lists.celestial.com
> >> http://mailman.celestial.com/mailman/listinfo/filepro-list
> >
> > _______________________________________________
> > Filepro-list mailing list
> > Filepro-list at lists.celestial.com
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
> >
> >
> 
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list