[Pas2js] Subclassing TJSArray
Ryan Joseph
ryan at thealchemistguild.com
Sat May 12 03:17:48 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 also tried to use TVec2.from() to construct the array but:
1) -dJAVASCRIPT2015 didn’t define the symbol which from() requires
2) .from() return a TJSArray instead of the subclass TVec2
3) I think I read that implicit arrays aren’t supported yet but TVec2.from([0, 0]) didn’t work.
Regards,
Ryan Joseph
More information about the Pas2js
mailing list