[Mono-osx] Dumbarton and C# subclasses

Hawston LLH hawston at gmail.com
Sun May 13 07:22:39 EDT 2007


First, i noticed 2 possible errors.

1) you miss out namespace for the class
MonoClass *monoClass = [DBMonoEnvironment monoClassWithName:"<missing
namespace>.B" fromAssembly:myAssembly];

2) you miss out brackets for the function
MonoString *name = (MonoString*)[self invokeMethod:"Name()" withNumArgs:
0];

regards
hawston


On 5/13/07, Will Cosgrove <will at everydaysoftware.net> wrote:
>
> Hi All,
> I'm new to the list so I apologize in advance if this topic has been
> covered.  I'm currently prototyping some C#/Cocoa code for
> feasibility and I have run into a bit of a snag.  I have a C# class
> which I subclass.  Let's call them class A and class B : A.  I create
> the bridge class using code from the Dumbarton sample code like so:
>
> [...]
> MonoClass *monoClass = [DBMonoEnvironment monoClassWithName:"B"
> fromAssembly:myAssembly];
>
> The problem I'm having is when I try to invoke any methods in the
> super class, A, Dumbarton can't find those methods and I get the
> following error:
>
> 2007-05-12 22:58:29.267 MyTestApplication[15491] Dumbarton could not
> find the method Name
> 2007-05-12 22:58:29.267 MyTestApplication[15491] *** Uncaught
> exception: <DBMethodNotFound> Dumbarton could not find the method Name
>
> The way I'm invoking the method Name is like so:
>
> MonoString *name = (MonoString*)[self invokeMethod:"Name" withNumArgs:
> 0];
>
> So I guess my question is, is this possible using Dumbarton and if
> so, how does one go about getting it to work. =)
>
> Thanks in advance,
> Will C.
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20070513/129cc34f/attachment.html 


More information about the Mono-osx mailing list