Goo on .NET update: I had to change the way .NET class methods are exposed to Goo. Previously it was namespace name, class name followed by parameter names (to account for overloaded method names). For example:
(system_reflection_assembly-gettype-name a "MyClass")
When I took that approach I didn't account for overloaded methods where the parameter name is the same. So I've now taken the approach of having the parameter type appended to the method name:
(system-reflection-assembly-gettype-string a "MyClass")
Note that I've also been consistant with the use of '-' vs '_'. I've got array types working correctly now. For example, the following uses the .NET Stream class to read data into a Goo <vec>:
(dv buf (fab <vec> 8192)) (fill buf #space)
(dv count (system-io-stream-read-byteaa-int32-int32 stream buf 0 (len buf)))
When calling a method that takes an array you'll see that 'aa' is appended to the parameter type in the Goo call above. At the end of the above call fab will contain the contents of the stream read call.
Another change is I no longer use <int> for representing .NET objects. I use a <dotnet-object> class which holds the details for accessing the .NET object internally.
The C# program for generating the Goo interfaces to .NET is much more complete. It can handle arrays of objects, arrays of bytes, and generates interfaces correctly for most of the .NET classes I've tried (System.Reflection and System.Net mainly).
I hope to have the updated version of this available for download within the next couple of days.
9:17:10 AM
|