Peter Kiers
asked on
Can Public be declared more than once.
Dear Experts,
I have some code on EE that i have put in the code-secion.
you see that the word Public has been declared twice.
Can this be done?, or is it an error and it has to be Published!
Peter Kiers
I have some code on EE that i have put in the code-secion.
you see that the word Public has been declared twice.
Can this be done?, or is it an error and it has to be Published!
Peter Kiers
type
TItem = class(TObject)
private
fStatus: byte;
fParentID: integer;
fNodeText: string;
fID: integer;
fData: string;
fSaver: TAdoQuery;
fChanged: Boolean;
fSaveImmediate: boolean;
fIsNew: Boolean;
fImageIndex: integer;
procedure SetData(const Value: string);
procedure SetNodeText(const Value: string);
procedure SetParentID(const Value: integer);
procedure SetStatus(const Value: byte);
procedure SetImageIndex(const Value: integer);
protected
procedure Changed; dynamic;
public
constructor Create(aSaver: TAdoQuery; AId, AParentID: integer; AStatus: byte);
constructor LoadFromDataset(aSaver: TAdoQuery);
procedure Save;
procedure Delete;
procedure BeginUpdate;
procedure EndUpdate;
public
property ID: integer read fID write fID;
property ParentID: integer read fParentID write SetParentID;
property ImageIndex: integer read fImageIndex write SetImageIndex;
property Status: byte read FStatus write SetStatus;
property Data: string read fData write SetData;
property NodeText: string read fNodeText write SetNodeText;
end;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
i changed published to public
you can declare private, protected, public, published as many times as you like
this is usually done when in test or draft stage
afterwards the sections are combined when doing code cleanup
you can declare private, protected, public, published as many times as you like
this is usually done when in test or draft stage
afterwards the sections are combined when doing code cleanup
ASKER