[Mono-osx] MonoMac Drag and Drop
duane at wandless.net
Tue Sep 14 13:47:35 EDT 2010
Submit a patch to this thread. Or do a git fork and send a pull request.
On Tue, Sep 14, 2010 at 1:38 PM, Marcelo Martínez
<marcemartinez at gmail.com>wrote:
> In order to make it work you need to do the messaging invocation directly
> like this:
> static IntPtr selDraggingPasteboard = Selector.GetHandle
> private NSPasteboard GetPasteboard(NSDraggingInfo sender)
> return (NSPasteboard) Runtime.GetNSObject
> (MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend (sender.Handle,
> public NSDragOperation DraggingEntered(NSDraggingInfo sender)
> NSPasteboard pboard = GetPasteboard(sender);
> Working on this, I have found some missing methods on NSView and some error
> definition on NSImage class that I've changed locally. Where can I report
> this problems or how can I contribute to this changes?
> On Thu, Sep 9, 2010 at 4:53 PM, Marcelo Martínez <marcemartinez at gmail.com>wrote:
>> I am trying to port a simple Cocoa drag and drop sample to MonoMac but I
>> am not able to access NSDragginInfo members.
>> This is the most relevant code:
>> public partial class DragDropImageView : NSImageView
>> public NSDragOperation DraggingEntered(NSDraggingInfo sender)
>> NSPasteboard pboard = sender.DraggingPasteboard;
>> when sender.DraggingPasteboard is invoked it craches. The reason could be
>> that the sender (NSObject) has not an implementation of NSDraggingInfo
>> protocol on MonoMac side? What could be the guideline to work this out?
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx