I am modernising the SDL unit by replacing all of the records with
classes. This should avoid warnings.
and then
var
whatever1 : whatever;
begin
// new(whatever1);
// becomes
whatever1 := whatever.create;
...
and Lazarus does not understand how to do a
whatever1.whatever.create;
nor a
whatever1.free;
maybe because your classes don't descend from any other class that owns
a "create" or "free" methods...
If you use classes, out of the top of my head, I could say that an
instantiation, like
var C: MyRecordConvertedToClass;
...
C.X = 10;
C.Y = 20;
should be enough.
Otherwise, you had better define a base class, with constructor and
destructor, overriding them as needed in every derived class.
Anyone correct me if I am wrong in this statement...
Cheers, A.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus