I believe this works.  I'm not positive about the ref, but since you have a
pointer to a pointer I think that is what is needed.

[BaseType (typeof (NSObject))]
interface Test {
   [Export ("somefunction")]
   void SomeFunction();

   [Export ("somefunction:")]
   void SomeFunction(ref NSError err);

}

On Wed, Feb 29, 2012 at 4:48 PM, Rolf Bjarne Kvinge <[email protected]>wrote:

> Hi Danny,
>
> From what I understand Error is a protocol Test implements. Currently
> there is no way to implement protocols in a bindings project, you have to
> add the methods to Test yourself. So, if for instance the Error protocol
> has a getMessage method, you'll have a "[Export ("getMessage")] string
> GetMessage ();" in your api definition for Test.
>
> Rolf
>
> On Wed, Feb 29, 2012 at 3:43 PM, Danny Pronk <[email protected]> wrote:
>
>> Hi Dermotos,
>>
>> Thanks for your answer.
>> The export of that function was actually clear to me,
>> What I need to find out is how to deal with the 'double' declaration of
>> the interface (see my example below)
>> The first one is clear. but what to do with Test (Error).
>> Test.h
>> contains :
>>
>> @interface Test : NSObject
>>
>> @end
>>
>> @interface Test (Error)
>>
>> @end
>>
>> Could you please advise
>>
>> Regards
>>
>> Danny
>>
>> Op 29 feb. 2012, om 10:05 heeft dermotos het volgende geschreven:
>>
>> Should be something along the lines of
>>
>> [Export("someFunction:error")]
>> bool SomeFunction(NSError error);
>>
>>
>> I've managed to get bindings working before, but I feel for you, its tough
>> work!
>>
>> --
>> View this message in context:
>> http://monotouch.2284126.n4.nabble.com/Binding-to-Objective-C-Types-Urgent-question-tp4429364p4430990.html
>> Sent from the MonoTouch mailing list archive at Nabble.com.
>> _______________________________________________
>> MonoTouch mailing list
>> [email protected]
>> http://lists.ximian.com/mailman/listinfo/monotouch
>>
>>
>>
>> _______________________________________________
>> MonoTouch mailing list
>> [email protected]
>> http://lists.ximian.com/mailman/listinfo/monotouch
>>
>>
>
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to