[Mono-bugs] [Bug 434538] New: Invalid cast in PasteBoard.Types
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Oct 10 20:58:28 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=434538
Summary: Invalid cast in PasteBoard.Types
Product: Cocoa#
Version: unspecified
Platform: Macintosh
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Major
Priority: P5 - None
Component: Bindings.
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: ultraviolet7 at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: Development
Created an attachment (id=244967)
--> (https://bugzilla.novell.com/attachment.cgi?id=244967)
Patch + Repo Sample
Using the attached sample program, dragging a file from Finder into the main
window of the test application will throw an error (below). This caused by a
Cocoa.String and Cocoa.String[] being cast a System.String and System.String[]
respectively. Attached is a patch for this error along with the update to the
documentation as this affects a public interface.
The "DragNDrop" sample in the sample folder does not function properly so I
also recommend considering replacing it with attached sample (or I can look
into fixing "DragNDrop").
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. --->
System.Reflection.TargetInvocationException: Exception has been thrown by the
target of an invocation. ---> System.InvalidCastException: Cannot cast from
source type to destination type.
at Cocoa.Pasteboard.ListForType (System.String type) [0x00000]
at devoc.MyView.ValidateDrag (Cocoa.DragDestination sender) [0x00000]
at devoc.MyView.DraggingEntered (Cocoa.DragDestination sender) [0x00000]
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(object,object[])
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception
stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[]
parameters) [0x00000]
at Cocoa.ObjCInterop.Dispatch (IntPtr objc_class_ptr, IntPtr objc_selector,
System.Object[] arguments) [0x00000]
at 45ff5f94-7d1a-4405-a90a-faba59dda100.Dispatch (IntPtr , IntPtr , IntPtr )
[0x00000]
at (wrapper native-to-managed) 45ff5f94-7d1a-4405-a90a-faba59dda100:Dispatch
(intptr,intptr,intptr)
at (wrapper managed-to-native)
System.Void_System.IntPtr_System.IntPtr:objc_msgSend (intptr,intptr)
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(object,object[])
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception
stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]
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]
at System.Type.InvokeMember (System.String name, BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object target, System.Object[] args)
[0x00000]
at Cocoa.ObjCMessaging.objc_msgSend (IntPtr receiver, System.String selector,
System.Type rettype) [0x00000]
at Cocoa.Application.RunApplication () [0x00000]
at Cocoa.Application.Run () [0x00000]
at MyProgram.Program.Main (System.String[] args) [0x00000]
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list