Page 1 of 1
tPrintPreview Demo problem

Posted:
September 3rd, 2015, 6:54 am
by TinMIner
only new at this and I am trying to run the demo programs in with tPrintPreview
I am running Delphi 5 on XP,
I created the package "Package1" and compiled as runtime
Included VCL50 (it was already listed)
When I open the "General" Demo and try to run it I get an errors
"Field MainForm.ThumbnailPreview does not have a corresponding component. Remove the declaration?"
"Field MainForm.PageSetupDialog does not have a corresponding component. Remove the declaration?"
"Field MainForm.PrintPreview does not have a corresponding component. Remove the declaration?"
Similar problem with the other two demos as well.Any direction as to what I am doing wrong would be appreciated.
Re: tPrintPreview Demo problem

Posted:
September 3rd, 2015, 9:11 am
by Kambiz
You must compile your package as both runtime and design-time.
Re: tPrintPreview Demo problem

Posted:
September 3rd, 2015, 1:29 pm
by TinMIner
Thanks Kambiz,
I went back and edited , selected runtime and design time but still have the same problem.
Basically, I created a new package, added the preview.pas. It already has Vcl50.dcp in the required.
In options selected design time and runtime, and explicit rebuild. Compiled it.
saved it all.
Opened the General Demo, added Package1 in the Runtime Packages, and selected Build with runtime packages
Still get the same probem.
I will remove it all, start fresh with the downloaded zip and try from the start again, but i have tried it several times with the same result.
DO I have to do anything to the General.pas, it already has "Preview" in the uses list.
Re: tPrintPreview Demo problem

Posted:
September 3rd, 2015, 1:52 pm
by Kambiz
Did you install the package, or only rebuilt?
The package settings should be like this:

- package.png (9.4 KiB) Viewed 1953 times
Re: tPrintPreview Demo problem

Posted:
September 3rd, 2015, 2:24 pm
by TinMIner
Hi Kambiz
yes Same Options, I was putting 'Print preview", for description but all the rest are as per.
I redid it all as per your desc for uniformity, and The attached screen1 shows its installed and the components exist
Screen 2 is the error when I try to run General demo.
Appreciate the assistance , don't know where I am going wrong.
midnight here, have to pass out for a while, check back later.
regards
Ray
Re: tPrintPreview Demo problem

Posted:
September 4th, 2015, 4:01 am
by TinMIner
well I now have two out of three operating no problems, and the General Demo only error is
// PageSetupDialog: TPageSetupDialog; I commented it out and now it runs as well.
This appears to be correct for Delphi 5 as per the readme
Version 5.12 (February 2, 2009) - The TPageSetupDialog component is not available in Delphi versions before Delphi 7, therefore the SetPageSetupParameters and GetPageSetupParameters methods of TPrintPreview control should not be available for those versions of Delphi too. Missing this was causing the component could not be installed on Delphi 6 and earlier.
ALTHOUGH does this mean it was fixed?
Version 5.13 (February 23, 2009) - Fixed compatibility issues with Delphi 5 and earlier.
FROM the PREVIEW.PAS
{ TPrintPreview v5.90
{ TPaperPreview v2.20
{ TThumbnailPreview v2.11
Is there a later version of the DEMO's? How do I tell?
Re: tPrintPreview Demo problem

Posted:
September 6th, 2015, 6:58 am
by Kambiz
All version dependent codes are guarded by compiler directives.
I guess you don't have DELPHIAREA.INC file is in the search path.