[Pas2js] External class constructor inheritance
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Dec 16 14:56:23 CET 2023
On 16.12.23 13:16, Henrique Gottardi Werlang via Pas2js wrote:
> Hello!
>
> I need some help with one situation I have here. I created an sample:
>
> unit Main;
>
> {$modeswitch externalclass}
>
> interface
>
> type
> TMyClass = class external name 'C'
> public
> constructor New(ConstructorParam: Integer);
> end;
>
> TMyAnotherClass = class(TMyClass)
> public
> constructor Create(ConstructorParam: Integer);
> end;
>
> implementation
>
> { TMyAnotherClass }
>
> constructor TMyAnotherClass.Create(ConstructorParam: Integer);
> begin
> inherited;
> end;
>
> end.
>
> I need call the external class constructor from the Pascal class constructor. How do I do it?
Have you seen:
https://wiki.freepascal.org/Pas2js_Transpiler#External_class_as_ancestor
?
Mattias
More information about the Pas2js
mailing list