I need a purely text serialization of an object in VBScript.
Does VBScript provide any built-in support for serialization or is it up to me to enumerate the properties and put them in a string?
Thought this might be useful to someone who got here from Google.
You could use a JSON serializer. (for ASP) Though I've noticed it has issues with COM objects. (Solved w/ Hack) As long as you're mostly serializing basic VBScript classes you'll be good.
No, VBScript doesn't have any object serialization functionality built in. You will have to implement it yourself (or try finding some ready-made solutions).
Here's another
http://code.google.com/p/aspjson
And here is my shameless self promotion:
https://github.com/rcdmk/aspJSON
A fast classic ASP JSON parser and encoder for easy JSON manipulation to work with the new JavaScript MV* libraries and frameworks
Related
I am working on migration of VB6 Application to VB.net.
the VB6 code uses ChrB quite often and I need to know how to convert it into vb.net
has anyone faced any similar issue..?
Regards,
Rasheed
VB.NET doesn’t support “byte-oriented” string methods.
VB Migration Partner provides the ChrB6 replacement method, which approximates the original VB6 method’s behavior but isn’t guaranteed to work well in all circumstances. This replacement method is marked as obsolete and methods invocations are flagged with a migration warning.
I want to use the python module imaplib, email in vb.net to read the gmail email with attachments. How can i use the python module in vb.net
Presuming you already looked at Brad's suggestion and didn't find it quite satisfying there is a .Net module for handling python, although this seems like the inverse of what you're looking for.
The only way that you could realistically use a Python library in .NET is to use IronPython. It is possible to embed IronPython in a C# app and the best explanation of that is in the book IronPython in Action.
However, this introduces a lot of layers in an application and may not be the wisest way to go unless you can make use of a general scripting language in your app.
I've been learning about DynamicObject in .NET 4.0 and was wondering if this type would be well suited to creating mock objects.
Mocking seems like a great way to use DynamicObject, but am I missing something?
Are there any mocking frameworks that use DynamicObject (as opposed to dynamic proxies or interception) for mocking?
Are there any disadvantages to using DyanmicObject for mocking (besides requiring the .NET 4.0 CLR)?
The biggest drawback that I can think of is that you can call literally any method/property in the world on a dynamic types.
for example, think of the hell it would be to update your tests if your api changed - you tests would still all compile, however they would all die with runtime errors if they tried to exercise the renamed/removed methods.
This, combined with the fact that you lose all Intellisense when operating on dynamic objects leads me to believe that a dynamic-based mocking library would be more difficult to use that something proxy-based like Rhino.
Is it possible to use an ActiveX/COM object from ColdFusion? If so, where's the documentation or samples for it?
(non ColdFusion programmer, asking on behalf of a ColdFusion programmer)
see: Integrating COM and CORBA Objects in CFML Applications
If you're worried about COM object performance, use .NET based CFML Engine like BlueDragon for the Microsoft .NET Framework
You can call both COM objects and .Net assemblies natively in ColdFusion both with excellent performance. Check out the following in the cf docs:
http://livedocs.adobe.com/coldfusion/8/htmldocs/cfobject_01.html
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=dotNet_01.html
Examples are included in the docs.
I'm wondering if anyone has any tips for integrating Lua and VB6. I am running a small Online RPG that would be awesome to add some scripting to.
Well, it is doable. I once did it for Lua 5.0.2 but I can't find the files. Among the options you have, you can:
Wrap Lua in a COM dll exposing the Lua API, so in VB you can add a reference to it.
Build your custom Lua version, using the __stdcall calling convention, so you can use Declare in VB to import the needed Lua functions. Writing a Type Library will ease a lot the integration with VB (mainly, it will do the conversion from C strings to VB strings for you).
Build a wrapper DLL, that replicates Lua's interface but using __stdcall, adding the functions that are defined with macros, etc.
I remember that using a custom built Lua, I could register VB functions (defined in modules) into Lua and call them from a script. I don't recall if I ever got it to call member functions.
I hope this can get you started.
Use LuaInterface. It's a .NET Library that allows you to use lua. However it doesnt come with docs in and of itself, look at this for some helpful guides.
Basically, you add the DLL to your project and reference it/add using satements, then create a new Lua object. From there, you can access it like an array to extract variables, and there are methods to call lua functions and manipulate tables.