| View previous topic :: View next topic |
| Author |
Message |
rob kemp Guest
|
Posted: Thu May 26, 2005 2:15 pm Post subject: Abstract Error - Please help |
|
|
Hi,
I got the following error when I execute my application (Abstract Error)
I googled on it and found some info that it's related to the
creation of TStrings at runtime.
As a matter of fact, my application creates strings (or labels) at runtime using:
TStaticText* text = new TStaticText(this);
//TLabel* text = new TLabel(this); // i tried this and nothing changed
text->Parent = this;
text->Color=clWhite;
text->Font->Size=10;
text->Top=10;
text->Left=100;
How can I solve this problem? has anyone seen this error before?
As indicated above, I replaced StaticText by Label and nothing really changed.
Thanks in advance for your help
Rob
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu May 26, 2005 4:45 pm Post subject: Re: Abstract Error - Please help |
|
|
"rob kemp" <NoSpam (AT) yahoo (DOT) com> wrote
| Quote: | I got the following error when I execute my application (Abstract Error)
|
Where EXACTLY does the error occur? There is nothing abstract in the code
you have shown so far.
Gambit
|
|
| Back to top |
|
 |
rob kemp Guest
|
Posted: Fri May 27, 2005 2:34 pm Post subject: Re: Abstract Error - Please help |
|
|
Remy,
I chased the error and here is what I found.
What is creating the abstract error is the following:
- in my applications, I created lables at run time
and store the pointers in a TList, so the user can clear
them (make them invisible) when desired
TList *stList = new TList; //Create the list that stores the pointers
//Create labels at run time
TLabel* text = new TLabel(this);
text->Parent = this;
text->Color=clWhite;
text->Font->Size=8;
text->Caption="Text Here";
stList->Add(text); //add it to the list
//below is what causing the abstract error
// Make all the created labels invisible
if (stList->Count>0)
{
for (int i = 0; i < stList->Count; ++i)
{
TStaticText* st = static_cast<TStaticText*>(stList->Items[i]);
st->Visible=false;
st = NULL;
}
}
What's wrong with the code? how can I avoid the abstract error
thanks in advance
"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote:
| Quote: |
"rob kemp" <NoSpam (AT) yahoo (DOT) com> wrote in message
news:4295da05$1 (AT) newsgroups (DOT) borland.com...
I got the following error when I execute my application (Abstract Error)
Where EXACTLY does the error occur? There is nothing abstract in the code
you have shown so far.
Gambit
|
|
|
| Back to top |
|
 |
JD Guest
|
Posted: Fri May 27, 2005 3:24 pm Post subject: Re: Abstract Error - Please help |
|
|
"rob kemp" <NoSpam (AT) yahoo (DOT) com> wrote:
| Quote: |
[...] TLabel* text = new TLabel(this);
[...] TStaticText* st = static_cast<TStaticText*>(stList->Items[i]);
|
You allocate a TLabel and cast it TStaticText. They are not
the same.
~ JD
|
|
| Back to top |
|
 |
Daniel Mayo Guest
|
Posted: Fri May 27, 2005 3:49 pm Post subject: Disabling TCheckboxes or TRadiobuttons when TGroupBox is dis |
|
|
When a TGroupBox is disabled, any radioboxes or checkboxes within it are
disabled, but are not greyed out.. how can I get the radiobuttons and
checkboxes to grey out when their parent is disabled?
|
|
| Back to top |
|
 |
|