Critical error!!!

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
BoikovSoft
Newbie
Newbie
Posts: 20
Joined: Thu Mar 26, 2009 12:00 am
Location: Russia, Samara

Critical error!!!

Post by BoikovSoft » Sun Nov 29, 2009 10:29 am

Hello!

I have found out very unpleasant error. :cry:
Do the following:
1) open the editor.
2) Create TTreeNodeShape
3) Establish values:
Left: = 0;
Top: = 0;
Height: = 1300 Pix (the figure height should be more heights of visible area of a window of the designer)
Width: = 1000 pix;
4) Click on an empty place (on the form)
5) Anew click Shape.

Result:

You will see spontaneous moving of object on a vertical.

Help to eliminate please this problem as it is possible faster.

BoikovSoft
Newbie
Newbie
Posts: 20
Joined: Thu Mar 26, 2009 12:00 am
Location: Russia, Samara

Re: Critical error!!!

Post by BoikovSoft » Mon Nov 30, 2009 11:19 am

The problem disappears, when
Selected.ScrollToView: = false;

BoikovSoft
Newbie
Newbie
Posts: 20
Joined: Thu Mar 26, 2009 12:00 am
Location: Russia, Samara

Re: Critical error!!!

Post by BoikovSoft » Mon Nov 30, 2009 12:49 pm

When you add TGridShape
Top: = 1000;
Also you scroll page downwards.
Instal on any cell focus.
Grid cells are incorrectly allocated.
The position of a strip of scrolling (at least Vertical) in method Draw is not considered.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Critical error!!!

Post by Yeray » Tue Dec 01, 2009 2:22 pm

Hi BoikovSoft,

I've tried to reproduce it but couldn't. Please, try to prepare a simple example project we can run as-is to reproduce the problem here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

BoikovSoft
Newbie
Newbie
Posts: 20
Joined: Thu Mar 26, 2009 12:00 am
Location: Russia, Samara

Re: Critical error!!!

Post by BoikovSoft » Wed Dec 02, 2009 5:16 am

Error modelling:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
Var
  obj : TGridShape;
begin
  Tree1.Designing := true;

  OBJ := Tree1.AddShapeClass(0, 0,'', nil, TGridShape) as TGridShape;
  obj.Top := Form1.Height + 10;
  obj.Left := 400;

  Tree1.HorzScrollBar.Automatic := false;
  Tree1.VertScrollBar.Automatic := false;
  Tree1.HorzScrollBar.Visible := true;
  Tree1.VertScrollBar.Visible := true;
  Tree1.Selected.ScrollToCenter := false; // If objects very big it is better to switch-off this option.

  OBJ := Tree1.AddShapeClass(0, 0,'', nil, TGridShape) as TGridShape;
  obj.Top := 10;
  obj.Left := 400;

  OBJ.Selected := true;
end;
With mouse click cells of the top object, then bottom.
You will see, that Allocation of objects occurs not correctly and on a miscellaneous.
Last edited by BoikovSoft on Wed Dec 02, 2009 6:06 am, edited 1 time in total.

BoikovSoft
Newbie
Newbie
Posts: 20
Joined: Thu Mar 26, 2009 12:00 am
Location: Russia, Samara

Re: Critical error!!!

Post by BoikovSoft » Wed Dec 02, 2009 6:04 am

Here other error:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
Var
  tr: TTree;
  obj : TTreeNodeShape;
  r1, R2: TTreeRuler;
begin
  Tr := TTree.Create(Form1);
  tr.Parent := form1;
  tr.Align := alClient;
  Tr.Designing := true;
  r1 := TTreeRuler.Create(Form1);
  r1.Parent := form1;
  r1.Align := alTop;
  r1.Tree := tr;
  r1.Height := 20;
  r2 := TTreeRuler.Create(Form1);
  r2.Parent := form1;
  r2.Align := alLeft;
  r2.Tree := tr;
  r2.Width := 20;
  Tr.HorzScrollBar.Automatic := true;
  Tr.VertScrollBar.Automatic := true;
  Tr.HorzScrollBar.Visible := true;
  Tr.VertScrollBar.Visible := true;


  { If objects very big it is better to switch-off this option.
    This option works if it to establish in Design-mode}

   //Tr.Selected.ScrollToCenter := false;

  {When True - the Object is displaced in a bottom,
  False - the object is not displaced.
  It is easy for tracing, if in addition on the form to add rulers (TreeRuler)}



  OBJ := Tr.AddShapeClass(0, 0,'qwerty', nil, TTextShape);
  obj.Top := 10;
  obj.Left := 400;
  obj.Height := Form1.Height + 100;
  obj.Width := 300;
  obj.Border.Visible := true;

  OBJ.Selected := true;
end;
Now try to click on an empty place. Again on TTextShape. Again an empty place. Again on TTextShape. And so some times. On a vertical Ruler (R2) it will be visible as the object escapes downwards.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Critical error!!!

Post by Yeray » Wed Dec 02, 2009 10:17 am

Hi BoikovSoft,
BoikovSoft wrote:Error modelling:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
Var
  obj : TGridShape;
begin
  Tree1.Designing := true;

  OBJ := Tree1.AddShapeClass(0, 0,'', nil, TGridShape) as TGridShape;
  obj.Top := Form1.Height + 10;
  obj.Left := 400;

  Tree1.HorzScrollBar.Automatic := false;
  Tree1.VertScrollBar.Automatic := false;
  Tree1.HorzScrollBar.Visible := true;
  Tree1.VertScrollBar.Visible := true;
  Tree1.Selected.ScrollToCenter := false; // If objects very big it is better to switch-off this option.

  OBJ := Tree1.AddShapeClass(0, 0,'', nil, TGridShape) as TGridShape;
  obj.Top := 10;
  obj.Left := 400;

  OBJ.Selected := true;
end;
With mouse click cells of the top object, then bottom.
You will see, that Allocation of objects occurs not correctly and on a miscellaneous.
This Allocation problem seems to be reproducible randomly with that code. I'll add this to the wish list to be fixed in future releases (TV52014581).
Also note that the demo at What's New ?\Welcome !\Custom shapes\Grid shape looks stable.
BoikovSoft wrote:Here other error:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
Var
  tr: TTree;
  obj : TTreeNodeShape;
  r1, R2: TTreeRuler;
begin
  Tr := TTree.Create(Form1);
  tr.Parent := form1;
  tr.Align := alClient;
  Tr.Designing := true;
  r1 := TTreeRuler.Create(Form1);
  r1.Parent := form1;
  r1.Align := alTop;
  r1.Tree := tr;
  r1.Height := 20;
  r2 := TTreeRuler.Create(Form1);
  r2.Parent := form1;
  r2.Align := alLeft;
  r2.Tree := tr;
  r2.Width := 20;
  Tr.HorzScrollBar.Automatic := true;
  Tr.VertScrollBar.Automatic := true;
  Tr.HorzScrollBar.Visible := true;
  Tr.VertScrollBar.Visible := true;


  { If objects very big it is better to switch-off this option.
    This option works if it to establish in Design-mode}

   //Tr.Selected.ScrollToCenter := false;

  {When True - the Object is displaced in a bottom,
  False - the object is not displaced.
  It is easy for tracing, if in addition on the form to add rulers (TreeRuler)}



  OBJ := Tr.AddShapeClass(0, 0,'qwerty', nil, TTextShape);
  obj.Top := 10;
  obj.Left := 400;
  obj.Height := Form1.Height + 100;
  obj.Width := 300;
  obj.Border.Visible := true;

  OBJ.Selected := true;
end;
Now try to click on an empty place. Again on TTextShape. Again an empty place. Again on TTextShape. And so some times. On a vertical Ruler (R2) it will be visible as the object escapes downwards.
That's right too. Thanks for reporting it. I've also added this to the wish list to be fixed in future releases (TV52014582).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply