Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Problem with nullable property of object

$
0
0
Hi ifle,

Our view is that these issues are simply the result of bringing together two very different object models.

It isn't just a matter of null having different meanings. Strings, for example, are full-blown objects in .NET, but in VBScript they're more like primitive values. We could have kept them separate, with no mapping between them, but that would have made ClearScript very painful to use in most scenarios.

So we tried to choose reasonable mappings for the most common .NET and VBScript types. We know these mappings aren't perfect, and we'll be happy to add flexibility to accommodate legacy scripts as much as possible.

Maybe MarshalNullAsDispatch flag need to replace to the new one like MarshalNullAsNetDefault and marshal values as .NET runtime

If we understand correctly, standard .NET marshaling is wrong for your original scenario at the top of this thread, because it always turns .NET null into VBScript empty, whereas your script code expects nothing.

Our current plan is to go ahead with the change described above. Please let us know if you have any remaining concerns.

Cheers!

Viewing all articles
Browse latest Browse all 2297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>