Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 27 Apr 2024, 15:03

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 25 Dec 2013, 16:01 
Offline

Joined: 25 Dec 2013, 15:54
Posts: 2
//Напоролся сегодня на непонятное AV изнутри компонента. После исследований собрал пример из 1й строчки кода, нового приложения и 1 TDBGridEh на форме с заполненным только одним свойством.
//Это я что-то делаю не так? Версия 6.2, но есть подозрение что аналогичная есть и ранее и позже - так мало кто изгаляется.
//PS: в 5.* судя по всему работало, т.к. проект древний и внём не было этой AV до сборки с 6 ehLib
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DBGridEhGrouping, ToolCtrlsEh, DBGridEhToolCtrls, DynVarsEh, GridsEh,
DBAxisGridsEh, DBGridEh;

type
TForm1 = class(TForm)
g1: TDBGridEh;
procedure g1DblClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.g1DblClick(Sender: TObject);
begin
g1.Free; //AV
end;

end.


Top
 Profile  
 
PostPosted: 26 Dec 2013, 06:33 
Offline

Joined: 25 Dec 2013, 15:54
Posts: 2
Напоминает сильно прошлую историю с другими компонентами:
http://www.alphaskins.com/forum/index.p ... topic=6105

проблему обезвредил, но очень надеюсь на исправление:
Index: GridsEh.pas
===================================================================
@@ -3972,9 +3972,14 @@

procedure TCustomGridEh.CalcDrawInfo(var DrawInfo: TGridDrawInfoEh);
begin
+
if HandleAllocated
- then CalcDrawInfoXY(DrawInfo, ClientWidth, ClientHeight)
- else CalcDrawInfoXY(DrawInfo, Width, Height);
+ then begin
+ try
+ CalcDrawInfoXY(DrawInfo, ClientWidth, ClientHeight) ;
+ except
+ end;
+ end else CalcDrawInfoXY(DrawInfo, Width, Height);
end;

procedure TCustomGridEh.CalcDrawInfoXY(var DrawInfo: TGridDrawInfoEh;
@@ -7547,6 +7552,7 @@
begin
CheckCellMouse := CheckCellMouseClick(Message);
inherited;
+ try
if CheckCellMouse then
begin
CalcDrawInfo(DrawInfo);
@@ -7562,6 +7568,8 @@
CellMouseClick(CellHit, mbLeft, ShiftState, ARect, GridMousePos, CellMousePos);
end;
end;
+ except
+ end;
end;

procedure TCustomGridEh.WMRButtonDblClk(var Message: TWMRButtonDblClk);


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 81 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group