Re: [fpc-pascal] TObject

2008-11-04 Thread Carsten Bager
> 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 97

Re: [fpc-pascal] TObject

2008-11-04 Thread Joao Morais
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 co

Re: [fpc-pascal] TObject

2008-11-04 Thread Carsten Bager
> > 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 cha

Re: [fpc-pascal] TObject

2008-09-08 Thread Joao Morais
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 assignin