-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateTime parameter #141
Comments
Hi @fvi1234, ClearScript generally prefers full access over automatic conversion. That is, it aims to expose to script code the full capabilities of .NET data types, and vice versa. On the other hand, some data types (numbers, strings, etc.) are so fundamental that forcing manual conversion would have made ClearScript difficult to use. Timestamps are a bit of a gray area. They're quite fundamental, but their representation varies to the extent that automatic conversion can mean data loss. Nevertheless, we've received a number of requests for automatic conversion from V8 users, so we added it as a V8-only option. For VBScript's In the meantime, you can use .NET's Good luck! |
Hi,
That would be very helpful, thanks very much. Thanks |
…ws (GitHub Issue #9); added support for system documents (GitHub Issue #143); added IList implementation to V8 arrays; added ExtendedHostFunctions.typeLibEnums (GitHub Issue #147); added WindowsScriptEngineFlags.MarshalDateTimeAsDate (GitHub Issue #141); fixed generic type inference for COM interfaces; fixed enumeration of COM collections that don't provide class information (GitHub Issue #146); fixed memory leak impacting Windows Script object property assignment (GitHub Issue #135); updated build and API documentation. Tested with V8 7.9.317.32.
ClearScript 6.0 added |
Hello, thanks for this project, apart from MSScriptControl (where I can't get callbacks to work) it seems to be the only currently maintained way left to run VBScript from C# (correct?). I can't use Core thought because it does not include Microsoft.ClearScript.Windows which has the VBScriptEngine, so I have a Framework based project.
I've tested and everything seems to work execpt an issue passing a DateTime parameter. It does not seem to get converted into a (VBS) Date object, but has the type 'Object' in VBS. I know a workaround would be to convert to string and then back to date again (but would need to change a lot of existing scripts). But this is unexpected and wonder if this is a bug, especially since a conversion from (VBS) Date to (C#) does seem to be going on.
Is it a bug in ClearScript? Is it undefined behaviour? Am I doing something wrong? (impossible right?)
This is code from my test case including remarks:
edit: completely screwed up the formatting, corrected
The text was updated successfully, but these errors were encountered: