Can anyone give me some tips on debugging a component during design time ?
I have a descendent of TLabel (TMyLabel) and have introduced one new property. At run time, I can set a value for the new property (eg - TMyabel->NewProperty = SomeValue) and get the result I want.
From this I understand that the Setter method I am using for the private data member associated with the property is working OK (to confirm this I stepped through with the runtime debugger).
In the object inspector, the new property shows up OK, however when I try to set a value, I get an "access violation at address" error.
The code looks like the following:
published:
__property AnsiString NewProperty = { read = FNewProperty, write = SetFNewProperty };
private:
AnsiString FNewProperty;
void __fastcall SetFNewProperty(AnsiString value);
. . . .
void __fastcall TMyLabel::SetFNewProperty(AnsiString value)
{
FNewProperty = value;
}
Any constructive comments / suggestions etc would be appreciated.
I have a descendent of TLabel (TMyLabel) and have introduced one new property. At run time, I can set a value for the new property (eg - TMyabel->NewProperty = SomeValue) and get the result I want.
From this I understand that the Setter method I am using for the private data member associated with the property is working OK (to confirm this I stepped through with the runtime debugger).
In the object inspector, the new property shows up OK, however when I try to set a value, I get an "access violation at address" error.
The code looks like the following:
published:
__property AnsiString NewProperty = { read = FNewProperty, write = SetFNewProperty };
private:
AnsiString FNewProperty;
void __fastcall SetFNewProperty(AnsiString value);
. . . .
void __fastcall TMyLabel::SetFNewProperty(AnsiString value)
{
FNewProperty = value;
}
Any constructive comments / suggestions etc would be appreciated.