 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Gord Guest
|
Posted: Thu May 03, 2007 8:12 am Post subject: TChart error: "Property PrintMargins does not exist" |
|
|
I have no clue why I am getting this error when I try to run the program. I
make absolutely no reference to PrintMargins.
Anyone have any idea? |
|
| Back to top |
|
 |
David Berneda Guest
|
Posted: Fri May 04, 2007 12:02 am Post subject: Re: TChart error: "Property PrintMargins does not exist" |
|
|
Hi Gord
I think your application is being compiled using an old version of TeeChart
(check your "Search Path"), and this old version cannot recognize the
PrintMargins property as it is new in version 7.
PrintMargins custom values should be inside the *.dfm form file.
They get persisted whenever a change in the Print Preview dialog is done
to margins.
You can try switching to Form Text mode at design-time (pressing Alt+F12),
then manually deleting the PrintMargins values and Alt+F12 again.
regards
david
www.teechart.com
"Gord" <dont (AT) spam (DOT) me> wrote in message
news:46397df0$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I have no clue why I am getting this error when I try to run the program.
I make absolutely no reference to PrintMargins.
Anyone have any idea? |
|
|
| Back to top |
|
 |
Gord Guest
|
Posted: Fri May 04, 2007 8:13 am Post subject: Re: TChart error: "Property PrintMargins does not exist" |
|
|
David,
Thanks for your reply. However, I am not getting anywhere and am pretty
frustrated.
I haven't done anything unusual that I can see. I installed TeeChart7
without changing any of the defaults. The installation seemed to have moved
the original TeeChart files (v4) to a backup directory which makes sense.
I have checked my search paths. For the Compiler they are as follows:
$(BDS)\include
$(BDS)\include\dinkumware
$(BDS)\include\vcl
...\..\..\..\program files\steema software\teechart standard 7 for delphi
2006\delphi10\include
For the Linker they are as follows:
$(BDS)\lib
$(BDS)\lib\obj
$(BDS)\lib\psdk
...\..\..\..\program files\steema software\teechart standard 7 for delphi
2006\delphi10\lib
...\..\..\..\program files\steema software\teechart standard 7 for delphi
2006\delphi10\lib\obj
I looked at the install packages and it had a check beside TeeChart 7
Standard Components
Build with Runtime Packages was checked. tee, teeui, and teedb were listed
in there.
For the life of me, I cannot see where it would be using an old version of
TeeChart.
Next, you are right, PrintMargins is in the *.dfm file. I didn't delete it
because if it is part of TeeChart7, then it should be able to stay there,
the problem is obviously elsewhere. But for some strange reason I don't
actually see a PrintMargins property on the Object inspector which makes me
suspicious.
So then, I tried a brand new project. I added a TChart component. This
time I never clicked on it at design time. I did a project build and ran
it. A form appeared successfully (no error as shown in the Subject line
above) and a blank chart was on the form. Success - to a small degree.
I added one button to the form and put the following code inside the button
click:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Chart1->BottomAxis->Title->Caption = "This is the bottom title";
}
It built fine, but when I clicked on the button, I got an exception with an
EAccessViolation. Arg.
So I abondoned that and tried to add a series and some data. I borrowed
some code of yours that you posted earlier in this newsgroup just to see if
I could add a series.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Line1=new TLineSeries(this);
Line1->ParentChart=Chart1;
// Chart1->BottomAxis->Title->Caption = "This is the bottom title";
}
I do a build and get the following three errors.
[C++ Error] Unit1.cpp(19): E2451 Undefined symbol 'Line1'
[C++ Error] Unit1.cpp(19): E2303 Type name expected
[C++ Error] Unit1.cpp(19): E2379 Statement missing ;
In case you were wondering, unit1.h does contain
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Chart.hpp>
#include <ExtCtrls.hpp>
#include <TeEngine.hpp>
#include <TeeProcs.hpp>
Help!
BTW, if I do use TeeChart, almost all of the interaction will be coded as
opposed to doing things at design time, which is why I am trying to see if I
can do the most basic of things right now (such as adding a bottom title, or
adding a series).
"David Berneda" <david (AT) steema (DOT) com> wrote in message
news:463a31c6$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi Gord
I think your application is being compiled using an old version of
TeeChart
(check your "Search Path"), and this old version cannot recognize the
PrintMargins property as it is new in version 7.
PrintMargins custom values should be inside the *.dfm form file.
They get persisted whenever a change in the Print Preview dialog is done
to margins.
You can try switching to Form Text mode at design-time (pressing Alt+F12),
then manually deleting the PrintMargins values and Alt+F12 again.
regards
david
www.teechart.com
"Gord" <dont (AT) spam (DOT) me> wrote in message
news:46397df0$1 (AT) newsgroups (DOT) borland.com...
I have no clue why I am getting this error when I try to run the program.
I make absolutely no reference to PrintMargins.
Anyone have any idea?
|
|
|
| Back to top |
|
 |
David Berneda Guest
|
Posted: Fri May 04, 2007 2:27 pm Post subject: Re: TChart error: "Property PrintMargins does not exist" |
|
|
Hi Gord
I see now where is the problem.
| Quote: | Build with Runtime Packages was checked. tee, teeui, and teedb were
listed in there.
|
Tee,TeeUI and TeeDB are the names of the packages of the *old* TeeChart
version 4 that comes free included in BDS.
The package names for version 7 are another ones, in case of BDS 2006 they
are named:
Tee710, TeeUI710 and TeeDB710
So then BDS compiles your app using the *.hpp include files in the v7
folder,
but links it using the v4 packages that are in BDS lib folder.
I guess the access violation you got is because the mix of packages.
You might want to try compiling the app without "build with runtime
packages" to force
the compiler and linker to use v7 and the search paths.
| Quote: | I do a build and get the following three errors.
[C++ Error] Unit1.cpp(19): E2451 Undefined symbol 'Line1'
|
I think you need to declare the variable "Line1" first before using it.
| Quote: | BTW, if I do use TeeChart, almost all of the interaction will be coded as
|
You can check the C++ source code of the "Tee7New.exe" demo that comes
included with TeeChart Pro v7 under "Features" folder.
It contains many forms with many small code examples.
Additionally, for a faster response you can use our support forums and
newsgroups:
http://www.steema.com/support/support.html
Customer forums: http://support.steema.com
regards
david
www.teechart.com
"Gord" <dont (AT) spam (DOT) me> wrote in message
news:463adc36$1 (AT) newsgroups (DOT) borland.com...
| Quote: | David,
Thanks for your reply. However, I am not getting anywhere and am pretty
frustrated.
I haven't done anything unusual that I can see. I installed TeeChart7
without changing any of the defaults. The installation seemed to have
moved the original TeeChart files (v4) to a backup directory which makes
sense.
I have checked my search paths. For the Compiler they are as follows:
$(BDS)\include
$(BDS)\include\dinkumware
$(BDS)\include\vcl
..\..\..\..\program files\steema software\teechart standard 7 for delphi
2006\delphi10\include
For the Linker they are as follows:
$(BDS)\lib
$(BDS)\lib\obj
$(BDS)\lib\psdk
..\..\..\..\program files\steema software\teechart standard 7 for delphi
2006\delphi10\lib
..\..\..\..\program files\steema software\teechart standard 7 for delphi
2006\delphi10\lib\obj
I looked at the install packages and it had a check beside TeeChart 7
Standard Components
Build with Runtime Packages was checked. tee, teeui, and teedb were
listed in there.
For the life of me, I cannot see where it would be using an old version of
TeeChart.
Next, you are right, PrintMargins is in the *.dfm file. I didn't delete
it because if it is part of TeeChart7, then it should be able to stay
there, the problem is obviously elsewhere. But for some strange reason I
don't actually see a PrintMargins property on the Object inspector which
makes me suspicious.
So then, I tried a brand new project. I added a TChart component. This
time I never clicked on it at design time. I did a project build and ran
it. A form appeared successfully (no error as shown in the Subject line
above) and a blank chart was on the form. Success - to a small degree.
I added one button to the form and put the following code inside the
button click:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Chart1->BottomAxis->Title->Caption = "This is the bottom title";
}
It built fine, but when I clicked on the button, I got an exception with
an EAccessViolation. Arg.
So I abondoned that and tried to add a series and some data. I borrowed
some code of yours that you posted earlier in this newsgroup just to see
if I could add a series.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Line1=new TLineSeries(this);
Line1->ParentChart=Chart1;
// Chart1->BottomAxis->Title->Caption = "This is the bottom title";
}
I do a build and get the following three errors.
[C++ Error] Unit1.cpp(19): E2451 Undefined symbol 'Line1'
[C++ Error] Unit1.cpp(19): E2303 Type name expected
[C++ Error] Unit1.cpp(19): E2379 Statement missing ;
In case you were wondering, unit1.h does contain
#include <Classes.hpp
#include <Controls.hpp
#include <StdCtrls.hpp
#include <Forms.hpp
#include <Chart.hpp
#include <ExtCtrls.hpp
#include <TeEngine.hpp
#include <TeeProcs.hpp
Help!
BTW, if I do use TeeChart, almost all of the interaction will be coded as
opposed to doing things at design time, which is why I am trying to see if
I can do the most basic of things right now (such as adding a bottom
title, or adding a series).
"David Berneda" <david (AT) steema (DOT) com> wrote in message
news:463a31c6$1 (AT) newsgroups (DOT) borland.com...
Hi Gord
I think your application is being compiled using an old version of
TeeChart
(check your "Search Path"), and this old version cannot recognize the
PrintMargins property as it is new in version 7.
PrintMargins custom values should be inside the *.dfm form file.
They get persisted whenever a change in the Print Preview dialog is done
to margins.
You can try switching to Form Text mode at design-time (pressing
Alt+F12),
then manually deleting the PrintMargins values and Alt+F12 again.
regards
david
www.teechart.com
"Gord" <dont (AT) spam (DOT) me> wrote in message
news:46397df0$1 (AT) newsgroups (DOT) borland.com...
I have no clue why I am getting this error when I try to run the program.
I make absolutely no reference to PrintMargins.
Anyone have any idea?
|
|
|
| Back to top |
|
 |
Gord Guest
|
Posted: Fri May 04, 2007 7:18 pm Post subject: Re: TChart error: "Property PrintMargins does not exist" |
|
|
"David Berneda" <david (AT) steema (DOT) com> wrote in message
news:463afcf4 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi Gord
I see now where is the problem.
You might want to try compiling the app without "build with runtime
packages" to force
the compiler and linker to use v7 and the search paths.
|
Thanks David. That allowed the simple program to run and change the bottom
axis title.
I'll dive into it some a little later to see if the other issues are
addressed as well.
Obviously I need to get the other files (Tee710, TeeUI710 and TeeDB710) into
the runtime library and get rid of the old ones. Shouldn't this have been
done during the installation of TeeChart7 for the user?
As far as using the customer forums, I tried to login to them previously
with the customer information that came with the BDS2006 version of
TeeChart7, but was unable to. I contacted info @ steema and was told that
they are for registered users only. Since I had registered my customer
information number and password already, I assumed that meant for Pro
customers only.
Thanks again |
|
| Back to top |
|
 |
|
|
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 vote in polls in this forum
|
|