Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2021-07

Forward external class

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Henrique Gottardi Werlang

Hello!

I would like to know how I should proceed to a suggestion of implementation.

I have a situation, which would make it very easy for me if it were possible to declare external classes, with early declaration.

Like this:

unit MyUnit;
interface
{$modeswitch externalclass}
type
  TMyClass = class external;
  TMyAnotherClass = class external name 'MyAnotherClass' (TMyClass)
  end;
  TMyClass = class external name 'MyClass'
  end;
implementation

end.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20210708/1c8c0290/attachment.htm>

Reply by email

Michael Van Canneyt
to Henrique Gottardi Werlang
Henrique Gottardi Werlang wrote 16 lines
Hello! I would like to know how I should proceed to a suggestion of implementation. I have a situation, which would make it very easy for me if it were possible to declare external classes, with early declaration. Like this: unit MyUnit; interface {$modeswitch externalclass} type TMyClass = class;

This will work. No need to add the external keyword. See the web unit, it is full of it.

Michael.

Reply by email