In addition to what Martin said: as long as you have a non-static class method the value of the variable you call the class method on (e.g. myClass in your example) will be passed as Self parameter. So no need for extra parameters.
But how can myClass be passed ? myClass.CreateNewWindow is not accepted by the compiler, because CreateNewWindow is not a method of TClass, whereas TWindow.CreateNewWindow doesn't pass myClass. Regards, Adriaan van Os _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal