[Mono-osx] Using 'out' in bindings
Regan Sarwas
rsarwas at gmail.com
Wed Dec 29 19:22:47 EST 2010
Despite the documentation in
http://monotouch.net/Documentation/Binding_New_Objective-C_Types it appears
the generator (pulled from github) is now capable of generating bindings for
methods with "out" parameters. However it does not work correctly in all
cases.
I tried this on the following incorrect binding for NSGradient
--- [Export ("getColor:location:atIndex:")]
--- void GetColor (NSColor color, float location, int index);
+++ [Export ("getColor:location:atIndex:")]
+++ void GetColor (out NSColor color, out float location, int index);
The generator produced nearly correct code, however it added the the
following erroneous lines to the generated method.
void ret;
...
return ret;
Once those lines were removed from NSGradient.g.cs, the new binding worked
correctly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20101229/7b978776/attachment.html
More information about the Mono-osx
mailing list