[Pas2js] Subclassing TJSArray

Ryan Joseph ryan at thealchemistguild.com
Sat May 12 03:08:24 CEST 2018



> On May 11, 2018, at 11:18 PM, Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> 
> A Pascal class cannot be created with the JS 'new' operator, as it
> does not have a prototype. I added an error message.
> 
> I guess it is possible to descend from JS Array. A quick check revealed
> that the length property is read only, while in a simple example it
> works. I wonder what is the difference.

But TVec2 is a TJSArray subclass so how do we construct it now? Those “new” constructors are all part of TJSArray but they’re sealed off now.

Regards,
	Ryan Joseph



More information about the Pas2js mailing list