[Mono-osx] MonoMac parser.cs
duane at wandless.net
Tue Apr 20 09:31:11 EDT 2010
Miguel - this is fantastic btw!
I have taken parser.cs and extended it to handle categories. To start I
tested parsing NSArray.h. This produced NSArray.cs and NSMutableArray.cs.
I have "full" bindings for these obj-c classes.
However not all the bindings generated are valid. For example I do not know
how to generate a binding for this selector (note I do not use this
selector, just an example):
- (void)sortUsingFunction:(NSInteger (*)(id, id, void *))compare
Then comes the question of constructors. Take these two (the 2nd is not
really a constructor I know) from NSMutableArray for example:
My parser exposes these as:
IntPtr ArrayWithCapacity (uint numItems);
IntPtr InitWithCapacity (uint numItems);
First I do not think returning an IntPtr is correct. It should return
NSMutableArray. But IntPtr follows what was started with MT. Returning an
IntPtr will require calling GetNSObject which seems cumbersome. Unless I'm
Ideally we would not have to hand write too many methods or constructors.
What is the recommended binding for these? Note see my email about MonoMac
naming conventions. Ideally ArrayWithCapacity would still be exposed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx