Thanks for the clues, however so far no luck......
Maybe something in TdxImageEdit (are there any
members marked "abstract"?)
Not sure - Don't have the source.....
How about thePretty simple really.....
TBaseDataLink class - is there more to it than
TBaseDataLink = class(TPersistent)
private
FDisplayFormat : string;
FCricketDataService : TCricketDataService;
FKeyFields : TStringList;
FDisplayFields : TStringList;
protected
procedure RetrieveData; virtual; abstract;
public
constructor Create;
destructor Destroy; override;
procedure FillComponent(ADataSet : TDataSet; AComponent : TComponent);
published
property CricketDataService : TCricketDataService read FCricketDataService write FCricketDataService;
property KeyFields : TStringList read FKeyFields write FKeyFields;
property DisplayFields : TStringList read FDisplayFields write FDisplayFields;
property DisplayFormat : string read FDisplayFormat write FDisplayFormat;
end;
Neven:
> Does SetDonovan do anything (like create an object)
> which could cause an 'abstract error'
Nope all it does is:
procedure TADSSimpleEntity.SetDonovan(const Value : boolean);
////////////////////////////////////////////////////////////////////////////////
// PURPOSE: Property method
begin
FDonovan := Value;
FDataLink.RetrieveData;
FDataLink.FillComponent(FDataLink.FDataSet, Self);
end;
As always all comments appreciated.....
At 19:14 23/08/2001 +0700, you wrote:
I don't have the Dev Express components (AFAIK) so I can't
duplicate exactly what you have.
But just for fun I tried the following:
type
TBaseDataLink = class(TPersistent);
TSimpleDataLink = class(TBaseDataLink);
TImage1 = class(TImage)
private
FDataLink : TSimpleDataLink;
FDonovan : boolean;
procedure SetDonovan(const Value : boolean);
protected
{ Protected declarations }
public
constructor Create(AOwner : TComponent); override;
destructor Destroy; override;
published
property DataLink : TSimpleDataLink read FDataLink write FDataLink;
property Donovan : boolean read FDonovan write SetDonovan;
end;
none of my derived class functions "do" anything.
I can drop this thing onto a blank form with no errors.
I can also save and load the form - it saves like this:
object Form1: TForm1
Left = 629
Top = 112
Width = 1088
Height = 750
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Image11: TImage1
Left = 64
Top = 48
Width = 89
Height = 57
Donovan = False
end
end
All this doesn't lead to much useful information.
Except it suggests that whatever is causing your
"abstract error" and "reading Donovan" problems
is something missing from my anaemic approximation.
Maybe something in TdxImageEdit (are there any
members marked "abstract"?) How about the
TBaseDataLink class - is there more to it than
appears here?
Maybe a bug in the way the DataLink property
gets written to persistent store (like a missing
or extra "<"?. (Wild guesses).
weird stuff - wish i could be more helpful.
-ns
----- Original Message -----
From: Donovan J. Edye
To: Multiple recipients of list delphi
Sent: Thursday, August 23, 2001 6:56 AM
Subject: [DUG]: [Q] Component Property - Gives "Abstract Error"
G'Day All,
I have the following component that is descended from a Dev Express TdxImageEdit control
TBaseDataLink = class(TPersistent)
TSimpleDataLink = class(TBaseDataLink)
type
TADSSimpleEntity = class(TdxImageEdit)
private
FDataLink : TSimpleDataLink;
FDonovan : boolean;
procedure SetDonovan(const Value : boolean);
protected
{ Protected declarations }
public
constructor Create(AOwner : TComponent); override;
destructor Destroy; override;
published
property DataLink : TSimpleDataLink read FDataLink write FDataLink;
property Donovan : boolean read FDonovan write SetDonovan;
end;
Now the component compiles fine, but as soon as I drop it onto a form I get either:
"Error reading ADSSimpleEntity1.Donovan: Abstract Error." or propery Donovan does not exist if I attempt to reference it in code. Has anyone got any ideas for me? The other DataLink property works without a problem.
TIA
-- Donovan
----------------------------------------------------------------------
Donovan J. Edye [www.edye.wattle.id.au]
Namadgi Systems [www.namsys.com.au]
Voice: +61 2 6285-3460
Fax: +61 2 6285-3459
TVisualBasic = Class(None);
Heard just before the 'Big Bang': "...Uh Oh...."
----------------------------------------------------------------------
GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer
replacement. Also includes freeware delphi windows explorer components.
------------------------------------------------------------------------ Donovan
----------------------------------------------------------------------
Donovan J. Edye [www.edye.wattle.id.au]
Namadgi Systems [www.namsys.com.au]
Voice: +61 2 6285-3460
Fax: +61 2 6285-3459
TVisualBasic = Class(None);
Heard just before the 'Big Bang': "...Uh Oh...."
----------------------------------------------------------------------
GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer
replacement. Also includes freeware delphi windows explorer components.
----------------------------------------------------------------------