Hi,
I am writing a Tree class which have the following skeleton:
generic TTreeT = class
private
FItems: TList;
public
...
end;
The FItems variable is used to store Children of current node. My question
is:
Shall I store TTree in FItems or @TTree? My understanding is:
If a variable obj
Change to
Function rSafeVar: SafeVar_typ;
Joao Morais
Sorry about that. I pasted the wrong code in the email. I have
already changed that. It does still not compile after the change.
Carsten
Med venlig hilsen
Carsten Bager
BEAS A/S
Brørupvænget 10
DK-7650 Bøvlingbjerg
Tlf. : +45 9788
Here the Data getter is called, ie, hSafeVar, because you are reading a
value from it.
Use a function as a getter instead of a class member. Btw getters and
setters have not the same syntax, you need to create two different methods.
Was it this you meant? Now I cannot compile. If I change
Carsten Bager wrote:
Here the Data getter is called, ie, hSafeVar, because you are reading a
value from it.
Use a function as a getter instead of a class member. Btw getters and
setters have not the same syntax, you need to create two different methods.
Was it this you meant? Now I cannot
A have a unit (uSafeVar) with an object. The object has a property data of
the type
SafeVar_typ
If I do this it works (wSafeVar is called)
var
p:SafeVar_typ;
begin
p.d:=111;
SafeVar.data:=p;
end
If I do this it dos not work but it compiles (wSafeVar is not called)
begin
Carsten Bager wrote:
A have a unit (uSafeVar) with an object. The object has a property data of the type
SafeVar_typ
If I do this it works (wSafeVar is called)
var
p:SafeVar_typ;
begin
p.d:=111;
SafeVar.data:=p;
Here the Data setter is called, ie, wSafeVar, because you are assigning