One cause of a strange Windows error.
GCC Consulting
gccconsulting at comcast.net
Wed Nov 5 08:51:12 PST 2008
> -----Original Message-----
> From: filepro-list-bounces+gccconsulting=comcast.net at lists.celestial.com
>
[mailto:filepro-list-bounces+gccconsulting=comcast.net at lists.celestial.com]
On
> Behalf Of John Esak
> Sent: Wednesday, November 05, 2008 3:34 AM
> To: filepro-list at lists.celestial.com
> Cc: 'Lee'; fpsupport at fptech.com
> Subject: One cause of a strange Windows error.
>
>
> For those of you who use my old tip from The Guru days of building your
> browses as 3 separate pieces, a configuration line, a header line, and a
> data line... To give you more flexibility and control over the placement
of
> stuff on a long browse that fills a screen. (In fact, you *must* do this
on
> very long browses... Because there is a point where you can fill too much
> data into the browse wizard and it constructs a third line with missing
data
> or extra "'s and other strange stuff. (Maybe this has been fixed... Let me
> check... Nope, I can still build a "too-long" browse that breaks the
browse
> wizard...)
>
> Anyway, this is a very good work around. Why? If you'll notice, I
declare
> the variables as two with 5 letters and 1 with 6 letters. Meaning B_cfg
and
> b_hdr are 5 long and b_data is 6... one character longer. This way the
> browse "header" line and the browse "data" line exactly "line up" over
each
> other. You can place the *aa and *2, etc., for the data line just where
they
> visually go... As if you were in the browse wizard. Like this...
>
> Then: Declare b_cfg, b_hdr, b_data
> Then: b_cfg="(brw=7,14,1 xkey=AMDX show=pkeep mlen=8 prc=prcA
> fill=asc,top)"
> Then: b_hdr="[Apt-ID Location Date Time Sls Pct%"
> Then: b_data="*ai *2 *ad *4 *5 *au"
> Then: lookup alias=(filename) k=(exp) i=A -nxm b=(b_cfg & b_hdr & b_data)
>
> There is a pair of brackets [ ] around the header line stuff, and having
the
> b_data variable contain an extra character pushes the *'s to their correct
> position. No matter, just a nicety... The reason I am writing is about
> those brackets. Lee found out today that if the trailing one on the right
> side is misssing... You will get a very nice immediate Windows error the
> moment the lookup line is
> in clerk. You might waste a good bit of time wondering why an @key doesn't
> work or anywhere this lookup happens. Since you are used to filePro
building
> these browses for you and doing it correctly... Being the typical sloppy
> typer we all are... You may easily forget this rightmost bracket, and the
> syntax checker will *not* warn you about it. It can't, to it, you are just
> filling a variable with some characters... It doesn't know this has to
have
> a certain format and characters enclosing it. It is just some declared
> variable with junk in it. :-) As long as the trailing " is there, it
thinks
> things are fine.
>
> I talked with Ken and asked if this was the type of error that could be
> caught in the runtime since it obviously can't be caught in the cabe
syntax
> check. Happily, he said yes, and of course, since I'm copying this note
to
> Ray at support at fptech.com... It will get attended to for the next version.
> Which by the way if any of TPTB are listening will be when????? :-) I
never
> talk with Ken about such things, and he wouldn't tell me anyway...
Possibly
> because he probably doesn't know.. and definitely because ken just doesn't
> talk about these things... At least not in the 27 years I have known him.
> :-)
>
> So anyway, be careful about the parens ( ) in the configuration line, the
> brackets [ ] in the hdr line... And the quotes " " in all three lines...
And
> this little construction is a great way to get a whole lot of stuff on a
> browse without it breaking.
>
> Ray, to reproduce this, just remove the rightmost bracket from one of
these
> and see what happens. ;-) Thanks.
>
> John
>
> * The (b_cfg & b_hdr & b_data) in the lookup line itself does not require
> the '(' or ")' I just always put parens around expressions that are meant
> to be joined into one thing... It's only a way I clarify some "things".
:-)
>
>
>
>
> John Esak
> 21st Century Appraisals, Inc
> 1801 Oberlin Rd, Middletown, PA 17057
> 717-985-0200 x 1141
> john.esak at 21appr.com
I've posted this before, but will post the item again.
If one want to be able to vary the size(length)of the browse window based on
the amount of data to be displayed. i.e. order details, some with 2 or 3
lines some with 8 line some with 10 or more.
Using John's programming above, making one change to the b_hdr= line will
allow for controlling the number of lines displayed.
First you will need to count the number of records which would normally be
displayed by doing a lookup and using getnext to count the records involved.
Or if one has a "page #" associated with the record, get the highest value
in that field.
Rcount is the number records to be displayed.
::rcount="":sz(2,.0)="6";GOTO brw_nme 'set minimum
:: rcount le "10":sz=rcount+"4" 'the added 4 are the top and
bottom line of the browse window
::rcount gt "10":sz="16"
Width=",14,1"
Normal filepro
> Then: b_cfg="(brw=7,14,1 xkey=AMDX show=pkeep mlen=8 prc=prcA>
fill=asc,top)"
Variable line display
> Then: b_cfg=chr("40"){"(brw="{sz<"xkey=AMDX show=pkeep mlen=8 prc=prcA>
fill=asc,top)"
Of course, for the case above sz could be sz=sz{width{""
I like this variable browse as keeps from having a larger amount of blank
space in the browse windows when only a few records are displayed.
Richard Kreiss
GCC Consulting
rkreiss at gccconsulting.net
More information about the Filepro-list
mailing list