I have a 3rd party COM library, and this works in VBScript:
Set foo = CreateObject("Foo")
foo.Fields("FieldA") = 5
foo.Fields("FieldB") = "bar"
WScript.Echo foo.Fields("FieldA")
WScript.Echo foo.Fields("FieldB")
but I can't get the assignments to work in ruby:
foo = WIN32OLE.new("Foo")
foo.Fields("FieldA") = 5
it errors out on this, because the evaluation up until the assignment of
results in a Fixnum instance that has no "=" method or somesuch. I suspect
there's a way to workaround this with something like the _setproperty method
but I couldn't wrap my brain around it today. Anyone have a hint? Or is this
a weird edge case in the land of COM that win32ole can't work with?