Page 1 of 1

preview problems with fwh 2.6

PostPosted: Mon Oct 17, 2005 9:27 pm
by don l
Antonio,

I noticed that the metafile.c program was supplemented with metafi32.c

I am experincing 2 problems with the "new metafile" logic.

1. Each time I use the preview process ( vanilla - right out of the box ) with my report object, I get the following message - EVERY TIME.

( from metafi32.c )

Error (6) deleting enhanced metafile
Error Description

This is new with FWH 2.6 over FWH 2.5


2. If my report object is sized for legal sized / landscape paper and I double-click on the page, it does not get "larger" as in FWH 2.5. If my report object is for letter page portrait - it does get (slightly) larger.

The behaviour is much different from FWH 2.5 - before you started coding the previewer for ENHANCED METAFILES.

What is the difference? How can I address this? Why am I getting the message?

Etc.


Thanks in advance for your help.

PS - I think I will like this new message format once I get used to it.;

more preview testing results

PostPosted: Mon Oct 17, 2005 9:58 pm
by don lowenstein
Double click on preview screen.

If the image is for Portrait / 8.5 x 11 inch paper

the image WILL GET LARGER.

It appears that all LANDSCAPE reports, both 8.5 x 11 and 8.5 x 14 reports DO NOT GET LARGER by double clicking.

PostPosted: Wed Oct 19, 2005 4:56 pm
by Antonio Linares
Don,

Have you check if there are others EMF files in your windows TEMP (GetEnv("TEMP")) directory ?

Does the report preview remains open ?

Could you provide a sample to reproduce it ? Thanks.

PostPosted: Wed Oct 19, 2005 5:02 pm
by Antonio Linares
Don,

Could you please test samples\TestPrn2.prg and check if it works ok for you ? Here it works ok. Thanks.

PostPosted: Wed Oct 19, 2005 7:43 pm
by don lowenstein
I have isolated the problem.

Embarassingly (?) I must report the problem was due to "old sloppy coding".

Here is what happened.

In my library, I coded:

oReport:End() after calling the report-preview process. Apparently, this was needed at one point many years ago.

Problem was, your preview processor ended the report from within the Play() method. The enhanced metafile was deleted during this process.

When I called oreport:end() the oreport:device:end() method attempted to delete the metafile (which was deleted from the ::play() - ::end() - ::endpage() method) and the resultant error occured.

Consequently, when I called oreport:end() there was no metafile to delete - hence the error.

I'm not sure why this "old sloppy code" of mine did not produce a problem with prior versions (fwh 2.5 and Harbour .44). But the important thing is I'm ok now.

Thanks for your continued service and excellent product. Sorry for "venting" off-line. Just goes to show, most computer "users" (me in this case) are inherintly lazy, but, if the developers ( you in this case )make the users think a bit on their own, the users usually figure it out on their own.

Sincerely,

don

PostPosted: Wed Oct 19, 2005 10:33 pm
by Antonio Linares
Don,

Congratulations for solving it. We are happy to know its ok now.