Print Preview 5.11 problem

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

Print Preview 5.11 problem

Postby array81 » January 25th, 2009, 9:48 pm

Hi, I have installed with success last version of Print Preview on my Delphi 2006. When I try to compile "General Demo" I have a problem. You can see it on image.
The problem is on line 5745 of Preview.pass file.

I have also try to make a new sample application with a TPrintPreview and a TThumbnailPreview but I have the some error.

Can you help me.
Attachments
error.JPG
error.JPG (87.91 KiB) Viewed 1681 times
array81
Active Member
Active Member
 
Posts: 7
Joined: January 25th, 2009, 10:58 am

Re: Print Preview 5.11 problem

Postby Kambiz » January 26th, 2009, 11:54 am

Have you installed the latest updates of your Delphi? Seems on Delphi 2006, Item.Index of the virtual TreeView returns the wrong number.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: Print Preview 5.11 problem

Postby markbolten » February 18th, 2009, 9:14 am

Hi,

Kambiz wrote:Have you installed the latest updates of your Delphi? Seems on Delphi 2006, Item.Index of the virtual TreeView returns the wrong number.


i have the same problem. I use version 5.12 and Delphi 7

markbolten
markbolten
Active Member
Active Member
 
Posts: 8
Joined: February 17th, 2009, 2:11 pm

Re: Print Preview 5.11 problem

Postby Kambiz » February 20th, 2009, 2:27 pm

It's good that the bug occurs on Delphi 7 too because it's easier for me to track it.

I'll check it out.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: Print Preview 5.11 problem

Postby Kambiz » February 23rd, 2009, 3:12 pm

I couldn't regenerate the problem. :(

Anyway, I guess the problem is inside the Thumbnail drawing routine and because of that I checked range of Item.Index to prevent exception (get v5.13). I hope this fixes the problem.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: Print Preview 5.11 problem

Postby markbolten » February 25th, 2009, 3:42 pm

Kambiz wrote:I couldn't regenerate the problem. :(

Anyway, I guess the problem is inside the Thumbnail drawing routine and because of that I checked range of Item.Index to prevent exception (get v5.13). I hope this fixes the problem.


Hi,
the problem is still available!
Now i get a EAcessViolation error (see Image)

delphiarea1.png
Error Message in Delphi7
delphiarea1.png (8.47 KiB) Viewed 1524 times


or
delphiarea.png
Error if i execute in Windows XP
delphiarea.png (47.09 KiB) Viewed 1526 times
markbolten
Active Member
Active Member
 
Posts: 8
Joined: February 17th, 2009, 2:11 pm

Re: Print Preview 5.11 problem

Postby Kambiz » February 26th, 2009, 1:39 am

I could see the exception.

Search for the following line in Preview.Pas (line #7564)

Code: Select all
  if Stage <> cdPrePaint then Exit;

and replace it with this one

Code: Select all
  if (Stage <> cdPrePaint) or (Item = nil) or (Item.Index < 0) or (Item.Index >= Items.Count) then Exit;

Actually the Item should never be nil or having junk index. It is apparently because of a bug in ComCtrl 5 of XP.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Re: Print Preview 5.11 problem

Postby markbolten » February 26th, 2009, 8:25 am

The bug is fixed.

Thanks
markbolten
Active Member
Active Member
 
Posts: 8
Joined: February 17th, 2009, 2:11 pm


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 3 guests