tPrintPreview Demo problem

Please discuss general Delphi programming topics here.

tPrintPreview Demo problem

Postby TinMIner » September 3rd, 2015, 6:54 am

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.
TinMIner
Member
Member
 
Posts: 4
Joined: September 3rd, 2015, 6:29 am

Re: tPrintPreview Demo problem

Postby Kambiz » September 3rd, 2015, 9:11 am

You must compile your package as both runtime and design-time.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2430
Joined: March 7th, 2003, 7:10 pm

Re: tPrintPreview Demo problem

Postby TinMIner » September 3rd, 2015, 1:29 pm

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.
TinMIner
Member
Member
 
Posts: 4
Joined: September 3rd, 2015, 6:29 am

Re: tPrintPreview Demo problem

Postby Kambiz » September 3rd, 2015, 1:52 pm

Did you install the package, or only rebuilt?

The package settings should be like this:

package.png
package.png (9.4 KiB) Viewed 1998 times
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2430
Joined: March 7th, 2003, 7:10 pm

Re: tPrintPreview Demo problem

Postby TinMIner » September 3rd, 2015, 2:24 pm

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
Attachments
Screen1.jpg
project options
Screen1.jpg (279.14 KiB) Viewed 1998 times
Screen2.jpg
error on run or compile
Screen2.jpg (108.31 KiB) Viewed 1998 times
TinMIner
Member
Member
 
Posts: 4
Joined: September 3rd, 2015, 6:29 am

Re: tPrintPreview Demo problem

Postby TinMIner » September 4th, 2015, 4:01 am

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?
TinMIner
Member
Member
 
Posts: 4
Joined: September 3rd, 2015, 6:29 am

Re: tPrintPreview Demo problem

Postby Kambiz » September 6th, 2015, 6:58 am

All version dependent codes are guarded by compiler directives.
I guess you don't have DELPHIAREA.INC file is in the search path.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2430
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron