View Issue Details

IDProjectCategoryView StatusLast Update
0014241PackagesLazReportpublic2011-12-01 11:22
ReporterTom DuncanAssigned ToJesus Reyes 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.27 (SVN)Product Build 
Target Version0.9.30Fixed in Version0.9.27 (SVN) 
Summary0014241: Lazreport will not show any objects in the designer or Preview (Max OX 10.5.7)
DescriptionI have created some LazReport forms under Windows and all is well.
With the mac I do not get any visual information in the designer and the preview is blank.
However if I click around in the designer I do get the text based information from my Windows designed report.

Any ideas.

Tom Duncan
TagsNo tags attached.
Fixed in Revisionr21297
LazTarget0.9.30
WidgetsetCarbon
Attached Files
  • lazreport_short.patch (541 bytes)
    Index: source/lr_desgn.pas
    ===================================================================
    --- source/lr_desgn.pas	(revision 21307)
    +++ source/lr_desgn.pas	(working copy)
    @@ -1426,6 +1426,7 @@
       end;
       {$ENDIF}
     
    +  {$IFDEF LCLCarbon}Invalidate;{$endif}
       Down := False;
       if FDesigner.ShapeMode = smFrame then
         DrawPage(dmShape);
    @@ -1716,6 +1717,9 @@
       {$ENDIF}
       Moved := True;
       w := 2;
    +
    +  {$ifdef LCLCarbon}if Down then Invalidate;{$endif}
    +
       if FirstChange and Down and not RFlag then
       begin
         kx := x - LastX;
    
    lazreport_short.patch (541 bytes)
  • lazreport_long.patch.zip (2,633 bytes)

Activities

Dmitry Boyarintsev

2009-07-31 10:14

developer   ~0029416

is there a test project?

Tom Duncan

2009-08-04 00:46

reporter   ~0029512

Just try any of the demo examples in lazreport.
All fine under Windows XP

Tom Duncan

2009-08-19 07:53

reporter   ~0029968

You cannot select any text box etc. and then move it.
Things do seem to move but are not shown in the designer.

Tom

Dmitry Boyarintsev

2009-08-19 10:12

developer   ~0029971

the problem is because LazReport tries to draw inside MouseEvents (mousemove, mouseup).

It's unacceptable for Carbon widgetset. Any painting should be done inside Paint event only.

it can be worked around by calling additional invalidates or by using additional controls (to avoid large number of overpainting)

I'm attaching 2 patches (short and long) for Carbon.

Short: it's good as here-and-now workaround. You'll get controls moving and resizing, but you'll also get a lot of side-effects, like unpainted details.
It's also carbon specific:

Index: source/lr_desgn.pas
===================================================================
--- source/lr_desgn.pas (revision 21307)
+++ source/lr_desgn.pas (working copy)
@@ -1426,6 +1426,7 @@
   end;
   {$ENDIF}
 
+ {$IFDEF LCLCarbon}Invalidate;{$endif}
   Down := False;
   if FDesigner.ShapeMode = smFrame then
     DrawPage(dmShape);
@@ -1716,6 +1717,9 @@
   {$ENDIF}
   Moved := True;
   w := 2;
+
+ {$ifdef LCLCarbon}if Down then Invalidate;{$endif}
+
   if FirstChange and Down and not RFlag then
   begin
     kx := x - LastX;



Long: patch changes the whole MMove (MUp should be changed in the similar way), to become Carbon friendly. The same painting tactics would work on other widgetsets as well.

But since, i'm not maintainer of the component, i'm pretty sure, that Long-patch re-paints designer ineffectively.
 

2 Jesus: I'd suggest to commit Short patch, for now.

2009-08-19 10:13

 

lazreport_short.patch (541 bytes)
Index: source/lr_desgn.pas
===================================================================
--- source/lr_desgn.pas	(revision 21307)
+++ source/lr_desgn.pas	(working copy)
@@ -1426,6 +1426,7 @@
   end;
   {$ENDIF}
 
+  {$IFDEF LCLCarbon}Invalidate;{$endif}
   Down := False;
   if FDesigner.ShapeMode = smFrame then
     DrawPage(dmShape);
@@ -1716,6 +1717,9 @@
   {$ENDIF}
   Moved := True;
   w := 2;
+
+  {$ifdef LCLCarbon}if Down then Invalidate;{$endif}
+
   if FirstChange and Down and not RFlag then
   begin
     kx := x - LastX;
lazreport_short.patch (541 bytes)

2009-08-19 10:13

 

lazreport_long.patch.zip (2,633 bytes)

Jesus Reyes

2009-08-19 20:10

developer   ~0029988

Applied the short patch, will review long patch later thanks.

Issue History

Date Modified Username Field Change
2009-07-31 09:30 Tom Duncan New Issue
2009-07-31 09:30 Tom Duncan Widgetset => Carbon
2009-07-31 10:14 Dmitry Boyarintsev Note Added: 0029416
2009-08-03 13:25 Vincent Snijders LazTarget => -
2009-08-03 13:25 Vincent Snijders Status new => feedback
2009-08-03 14:20 Dmitry Boyarintsev LazTarget - => 1.0
2009-08-03 14:20 Dmitry Boyarintsev Status feedback => acknowledged
2009-08-04 00:46 Tom Duncan Note Added: 0029512
2009-08-19 00:56 Dmitry Boyarintsev Fixed in Revision => r21297
2009-08-19 00:56 Dmitry Boyarintsev LazTarget 1.0 => 0.9.28
2009-08-19 00:56 Dmitry Boyarintsev Status acknowledged => resolved
2009-08-19 00:56 Dmitry Boyarintsev Resolution open => fixed
2009-08-19 00:56 Dmitry Boyarintsev Assigned To => Dmitry Boyarintsev
2009-08-19 07:53 Tom Duncan Status resolved => assigned
2009-08-19 07:53 Tom Duncan Resolution fixed => reopened
2009-08-19 07:53 Tom Duncan Note Added: 0029968
2009-08-19 10:12 Dmitry Boyarintsev Note Added: 0029971
2009-08-19 10:13 Dmitry Boyarintsev File Added: lazreport_short.patch
2009-08-19 10:13 Dmitry Boyarintsev File Added: lazreport_long.patch.zip
2009-08-19 10:13 Dmitry Boyarintsev Assigned To Dmitry Boyarintsev => Jesus Reyes
2009-08-19 13:14 Vincent Snijders LazTarget 0.9.28 => 0.9.30
2009-08-19 13:14 Vincent Snijders Target Version => 0.9.30
2009-08-19 20:10 Jesus Reyes Status assigned => resolved
2009-08-19 20:10 Jesus Reyes Fixed in Version => 0.9.27 (SVN)
2009-08-19 20:10 Jesus Reyes Resolution reopened => fixed
2009-08-19 20:10 Jesus Reyes Note Added: 0029988
2011-12-01 11:22 Marc Weustink Status resolved => closed