trueinteractions / tint2

Native Javascript Applications
1.59k stars 41 forks source link

.NET class creation crash - win32 #160

Open petitben opened 9 years ago

petitben commented 9 years ago

Hi,

I tried your example described at https://www.trueinteractions.com/docs/tutorial-native.html but it always crashes in my case.

image

By the way how should be use the addContructor and addMethod functions in case of C# method overloading ? Calling addMethod for each overloaded method will work ?

Thanks in advance for your help!

petitben commented 9 years ago

Ok I think I got it... You can't actually define .NET new classes directly in js but only map js objects with existing .NET classes with possible callbacks and the definition must actually exist at .NET side right ?

If so forget about this issue... I guess I was a bit confused by the title in tutorial.

trevorlinton commented 9 years ago

Thanks for opening this, you're correct that currently you cannot create a class with methods on it due to an IR assembly change in .NET 4.5 thats broken the code, however your understanding of our docs is correct. You SHOULD be able to create a class with .NET but were still trying to determine a work around. If you simply need an extended class without methods (just values attached) these operations still work. Sorry for the error, we'll see if we can get this fixed soon.

petitben commented 9 years ago

Ok, thanks for your analysis. It's not a dramatic problem for me regarding my current tasks - I have other fish to fry for the moment :-) ... Just hope you'll find a suitable workaround soon.