[Cocoa-sharp] Problems with CocoaSharp Menu constructor missing

marc hoffman mh at elitedev.com
Mon Nov 3 12:02:11 EST 2008


Following up again:

looks like this ctor (and some other stuiff) is missing from the  
shipped cocoa-sharp.dll. i checked the latest SVN, and it has this  
(it's identical to what i have here), but it's not shipping. Geoff -  
can you check why this fix is not in the shipping version? i would  
classify this as rather critical, as basically any Cocoa3 app should  
be broken with this. :(

         public Menu(IntPtr native_object) : base(native_object){
         }

instead, the shipping dll has this ctor (which i cant find in source  
in SVNm old or new):

public Menu(string title)
{
     this.Init(title);
}
any thoughts?

marc


On Nov 3, 2008, at 5:52 PM, marc hoffman wrote:

> fwiw, this is not an Oxygene issue, but a general library prob. this
> will fail with C# too.
>
> On Nov 3, 2008, at 5:48 PM, marc hoffman wrote:
>
>> Joanna, everyone,
>>
>> looks this is a bug i long fixed; it works with my local copy, but  
>> not
>> with the one that ships with Mono 2.0.1. i'll start digging into the
>> bug reports now to see why this was never properly committed (it's
>> been a long while).
>>
>> Joanna - i'll email you a fixed dll for now.
>>
>> On Oct 30, 2008, at 7:59 PM, Joanna Carter wrote:
>>
>>> I am having problems getting a project to work correctly using
>>> Oxygene
>>> and targetting OS X.
>>>
>>> The resulting application seems to work OK as long as you only use a
>>> mouse to interact with the form.
>>>
>>> However, if you press any key on the keyboard, you get the following
>>> Console listing :
>>>
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863] Unhandled
>>> Exception: System.Reflection.TargetInvocationException: Exception  
>>> has
>>> been thrown by the target of an invocation. --->
>>> System.MissingMethodException: No constructor found for
>>> Cocoa.Menu::.ctor(System.IntPtr)
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> System.Activator.CreateInstance (System.Type type, BindingFlags
>>> bindingAttr, System.Reflection.Binder binder, System.Object[] args,
>>> System.Globalization.CultureInfo culture, System.Object[]
>>> activationAttributes) [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> System.Activator.CreateInstance (System.Type type, System.Object[]
>>> args,
>>> System.Object[] activationAttributes) [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> System.Activator.CreateInstance (System.Type type, System.Object[]
>>> args)
>>> [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> Cocoa.Object.FromIntPtr (IntPtr from) [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> Cocoa.ObjCInterop.Dispatch (IntPtr objc_class_ptr, IntPtr
>>> objc_selector,
>>> System.Object[] arguments) [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> 73b77736-36c5-40f2-a07a-afd3c715e4d9.Dispatch (IntPtr , IntPtr )
>>> [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> (wrapper
>>> native-to-managed) 73b77736-36c5-40f2-a07a-afd3c715e4d9:Dispatch
>>> (intptr,intptr)
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> (wrapper
>>> managed-to-native)
>>> System.Void_System.IntPtr_System.IntPtr:objc_msgSend
>>> (intptr,intptr)
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> (wrapper
>>> managed-to-native) System.Reflection.MonoMethod:InternalInvoke
>>> (object,object[],System.Exception&)
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
>>> invokeAttr, System.Reflection.Binder binder, System.Object[]
>>> parameters,
>>> System.Globalization.CultureInfo culture) [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   --- End
>>> of
>>> inner exception stack trace ---
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
>>> invokeAttr, System.Reflection.Binder binder, System.Object[]
>>> parameters,
>>> System.Globalization.CultureInfo culture) [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> System.MonoType.InvokeMember (System.String name, BindingFlags
>>> invokeAttr, System.Reflection.Binder binder, System.Object target,
>>> System.Object[] args, System.Reflection.ParameterModifier[]
>>> modifiers,
>>> System.Globalization.CultureInfo culture, System.String[]
>>> namedParameters) [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> System.Type.InvokeMember (System.String name, BindingFlags
>>> invokeAttr,
>>> System.Reflection.Binder binder, System.Object target,
>>> System.Object[]
>>> args) [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> Cocoa.ObjCMessaging.objc_msgSend (IntPtr receiver, System.String
>>> selector, System.Type rettype) [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> Cocoa.Application.RunApplication () [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> Cocoa.Application.Run () [0x00000]
>>> 30/10/08 13:13:41 [0x0-0x40040].com.CocoaApplication1[863]   at
>>> CocoaApplication1.Program.Main () [0x00000]
>>> 30/10/08 13:13:41 com.apple.launchd[126]
>>> ([0x0-0x40040].com.CocoaApplication1[863]) Exited with exit code: 1
>>>
>>> I really need a solution to this fairly urgently as I am trying to
>>> give
>>> a demonstration to a user group soon.
>>>
>>> Joanna
>>> _______________________________________________
>>> Cocoa-sharp mailing list
>>> Cocoa-sharp at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/cocoa-sharp
>>
>> _______________________________________________
>> Cocoa-sharp mailing list
>> Cocoa-sharp at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/cocoa-sharp
>
> _______________________________________________
> Cocoa-sharp mailing list
> Cocoa-sharp at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/cocoa-sharp



More information about the Cocoa-sharp mailing list