Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 893

Summary: AV on opening form with component using TChart
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: Other ComponentsAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED NOTABUG    
Severity: enhancement CC: buhl, david
Priority: ---    
Version: 140512   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=3&t=15110&p=67176#p67176
Chart Series: --- Delphi / C++ Builder RAD IDE Version: RAD XE6
Attachments: test ProjectGroup

Description yeray alonso 2014-08-20 04:52:13 EDT
Created attachment 269 [details]
test ProjectGroup

Find attached a ProjectGroup with 2 projects.
One is a simple component with a form and a Chart, and the other is a simple application using that component.

- Open the project Coll.drpoj.
- Build and install the component "Coll"
- Close the project.
- Open the project testApp.dproj. You'll get an AV.
Comment 1 david berneda 2014-09-12 12:59:29 EDT
Test shows the problem is only at design-time. It works at runtime:

uses CollChartPanel;

procedure TForm217.FormCreate(Sender: TObject);
var c: TCollChartPanel;
begin
  c:=TCollChartPanel.Create(Self);
  c.Parent:=Self;
  c.Height:=200;
end;


Probably its needed inside the CollChartPanel component to add code to support inner-controls (similar to our QRTee.pas control) to make it work at design-time.

At design-time, when doing this:

 FChart        := TChart.Create(Self);

The ide tries to add FChart to the Object TreeView, Object Inspector etc and can be confused without adding several methods (and a FChart.Name).

If the purpose is to hide the FChart from the user inside the ide at design-time, the correct way is to use "nil" as owner.