Thanks everyone! I'm still learning some parts of Pascal! I'll see if I can accommodate for that.
Gareth aka. Kit On Sun 29/07/18 08:14 , Sven Barth via fpc-devel fpc-devel@lists.freepascal.org sent: Thorsten Engler schrieb am So., 29. Juli 2018, 04:40: type TMyClass = class of TMyObject; TMyObject = class procedure InstanceMethod; //Self = TMyObject, can be virtual class procedure ClassMethod; //Self = TMyClass, can be virtual class procedure StaticClassMethod; static; //no Self, really just a global procedure in a scoped namespace end; var o: TMyObject; c: TMyClass; begin o.InstanceMethod; //if virtual, calls resolved based on actual class o.ClassMethod; //if virtual calls, resolved based on actual class o.StaticCalssMethod; //can’t be virtual, resolved on variable type TMyObject.ClassMethod; //call resolved based on given type TMyObject.StaticClassMethod; //call resolved based on given type c.ClassMethod; //if virtual, calls resolved based on actual class //haven’t tried if this one works, I assume it does: c.StaticClassMethod; //can’t be virtual, resolved on variable type end; @Gareth: And I mean the StaticClassMethod here. Regards, Sven _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org [2] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel [3]">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel Links: ------ [1] mailto:thorsten.eng...@gmx.net [2] mailto:fpc-devel@lists.freepascal.org [3] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel