![]() | Steema Issues DatabaseNote: 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. |
| Summary: | [TV52015501] The TColorGridSeries's CreateAutoLevels method seesm to work differen... | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | yeray alonso <yeray> |
| Component: | Other Components | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | IN_PROGRESS --- | ||
| Severity: | major | CC: | david, garethtyeparc |
| Priority: | High | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
Just tested with XE4 C++ and latest sources. The problem can be fixed by changing this line at top of VCLTee.TeeSurfa.hpp: OLD: #pragma pack(push,8) NEW: #pragma pack(push,4) So its a code alignment problem, but don't know why it happens. All the rest of Delphi units (and their hpp headers) specify 8 bytes global alignment (Quad Word) with no problem. So why is TContourSeries getting compiled (supposedly by dcc32) with align 4 ? |
The TColorGridSeries's CreateAutoLevels method seesm to work different in C++ than in Delphi. In Delphi one can do as in the demo: uses TeeSurfa; procedure TForm1.FormCreate(Sender: TObject); var ContourSer: TContourSeries; begin Chart1.View3D:=false; ContourSer:=Chart1.AddSeries(TContourSeries) as TContourSeries; ContourSer.FillSampleValues; ContourSer.NumLevels:=10; ContourSer.CreateAutoLevels; Caption:='num Levels: ' + IntToStr(ContourSer.Levels.Count); With ContourSer.Levels do begin Items[0].UpToValue:=-1; Items[1].UpToValue:=-0.8; Items[2].UpToValue:=-0.6; Items[3].UpToValue:=-0.4; Items[4].UpToValue:=-0.2; Items[5].UpToValue:= 0; Items[6].UpToValue:= 0.2; Items[7].UpToValue:= 0.4; Items[8].UpToValue:= 0.6; Items[9].UpToValue:= 0.8; end; end; But in C++Builder the CreateAutoLevels seems to create no levels and the Items or the Count gives error for me even when the customer says Count gives 0 for him: At the .h: #include "TeeSurfa.hpp" private: // User declarations TContourSeries *ContourSer; At the .cpp void __fastcall TForm1::FormCreate(TObject *Sender) { Chart1->View3D=false; ContourSer=new TContourSeries(this); Chart1->AddSeries(ContourSer); ContourSer->FillSampleValues(); ContourSer->NumLevels=10; ContourSer->CreateAutoLevels(); int c=ContourSer->Levels->Count; ContourSer->Levels->Items[0]->UpToValue=-1; ContourSer->Levels->Items[1]->UpToValue=-0.8; ContourSer->Levels->Items[2]->UpToValue=-0.6; ContourSer->Levels->Items[3]->UpToValue=-0.4; ContourSer->Levels->Items[4]->UpToValue=-0.2; ContourSer->Levels->Items[5]->UpToValue=0; ContourSer->Levels->Items[6]->UpToValue=0.2; ContourSer->Levels->Items[7]->UpToValue=0.4; ContourSer->Levels->Items[8]->UpToValue=0.6; ContourSer->Levels->Items[9]->UpToValue=0.8; } http://www.teechart.net/support/viewtopic.php?f=3&t=12265 [created:2011-04-15T11:44:08.000+01:00 reported by:yeray@steema.com reported in version:2011.03.30407 (TeeChart VCL)]