Open JernejL opened 5 years ago
Can you upload a complete test project with your issue?
I will try to make an isolated example.
As for object creation logic, does that seem correct way to do it at all?
Ok, here is a whole self-contained lazarus project that does what i experimented with, binary and all code included:
https://gtamp.com/tdc/besenexperiment.7z
I'm sure i'm doing a lot of things wrong or things could be done better, so i will take any kind of feedback on how to integrate besen better / properly.
I'm still learning on how besen works, but maybe out of this i can build a few more detailed examples and some nice documentation.
Writing again, just as notification.. i made the example and linked it here.
type..
TActorInterface = class(TBESENNativeObject)
class is registered properly so it can be prototyped from:
BesenInst.RegisterNativeObject('Actor', TActorInterface);
So i try to create a object on my side, and pass it as parameter to javascript
If i print the object it's: [object TActorInterface$Constructor] {}
Looks like some sort of empty object, it doesn't function properly in javascript (cannot change properties, etc.. ).
I've based my code on what i saw in https://github.com/Coldzer0/Cmulator/ project, i'm guessing i did something very wrong.
I'd just like to create an instance of native object, and pass it to function, so that properties and all can be correctly used as if it was created within javascript.
If you have a better method of contacting i'll take it, as i'm abusing tickets for help / support :( i'm in #besen channel but you are usually not reachable there.