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 - AV on opening form with component using TChart
Summary: AV on opening form with component using TChart
Status: RESOLVED NOTABUG
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Other Components (show other bugs)
Version: 140512
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-20 04:52 EDT by yeray alonso
Modified: 2014-09-12 12:59 EDT (History)
2 users (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version: RAD XE6


Attachments
test ProjectGroup (61.09 KB, application/octet-stream)
2014-08-20 04:52 EDT, yeray alonso
Details

Note You need to log in before you can comment on or make changes to this bug.
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.