• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Handle drop to WebView: WebDragDestinationActionDHTML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handle drop to WebView: WebDragDestinationActionDHTML


  • Subject: Handle drop to WebView: WebDragDestinationActionDHTML
  • From: Wayne Shao <email@hidden>
  • Date: Wed, 27 Oct 2010 16:19:14 -0700

I would like to handle drop to WebView to not load the  dropped object, but
to perform some customized action.
However, I ran into similar issues as described here:

http://lists.apple.com/archives/webkitsdk-dev/2005/May/msg00046.html

Basically, for these two callbacks in WebUIDelegate,

   - A. – webView:dragDestinationActionMaskForDraggingInfo:<http://developer.apple.com/library/mac/documentation/Cocoa/Reference/WebKit/Protocols/WebUIDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/instm/NSObject/webView:dragDestinationActionMaskForDraggingInfo:>
   -
   - B. – webView:willPerformDragDestinationAction:forDraggingInfo:<http://developer.apple.com/library/mac/documentation/Cocoa/Reference/WebKit/Protocols/WebUIDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/instm/NSObject/webView:willPerformDragDestinationAction:forDraggingInfo:>
   -

My question is: How can I return something other
than WebDragDestinationActionLoad in A and still have a chance to process
the data in method B?

Currently, the issues are:


   - If I return WebDragDestinationActionDHTML, B is never called.
   - If  return WebDragDestinationActionLoad, B is called, but I do not want
   to load the dropped resource. I want to customize it by extracting data and
   update the current resource in WebView.
   - Another option is to do the custom data extraction in A and
    return WebDragDestinationActionNone. But the callback A is invoked multiple
   times during a drag/drop operation, I need to only process it once at the
   last callback.  i.e., the correct place to do it is in callback method B.

Any solutions?

Thanks,
--
W. Shao
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Handle drop to WebView: WebDragDestinationActionDHTML
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: NSApplication nil?
  • Next by Date: Re: Drag and drop between two table views.
  • Previous by thread: Re: NSApplication nil?
  • Next by thread: Re: Handle drop to WebView: WebDragDestinationActionDHTML
  • Index(es):
    • Date
    • Thread