TBESEN.ObjectInstanceOf does not support classes registered with RegisterNativeObject #31

Open
opened 2025-01-29 13:20:04 +00:00 by JernejL · 0 comments
JernejL commented 2025-01-29 13:20:04 +00:00 (Migrated from github.com)

class registered in pascal:

BesenInstance.RegisterNativeObject('Vehicle', TVehicleInterface);

in javascript:

`var tvehicle = new Vehicle(VehicleIdent, SpawnX, SpawnY, SpawnZ, Heading, immediate_create);

if (tvehicle instanceof Vehicle) alert('yes');`

new Vehicle works properly as expected, creates a instance of the object.

instanceof however fails, and triggers exception "Prototype not object" in TBESENObjectFunction.HasInstance.

class registered in pascal: `BesenInstance.RegisterNativeObject('Vehicle', TVehicleInterface);` in javascript: `var tvehicle = new Vehicle(VehicleIdent, SpawnX, SpawnY, SpawnZ, Heading, immediate_create); if (tvehicle instanceof Vehicle) alert('yes');` new Vehicle works properly as expected, creates a instance of the object. instanceof however fails, and triggers exception "Prototype not object" in TBESENObjectFunction.HasInstance.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BeRo1985/besen#31
No description provided.