• 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
Re: Drag pasteboard only working within my app?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag pasteboard only working within my app?


  • Subject: Re: Drag pasteboard only working within my app?
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 3 Sep 2002 23:33:35 -0700

>Date: Wed, 4 Sep 2002 00:10:52 -0400
>Subject: Drag pasteboard only working within my app?
>From: Jorge Monteiro <email@hidden>
>
>I compiled my app with Jaguar (10.2) / Developer Tools (July + August
>update) and now it does not work :( The problem is with dragging. The
>code that used to work now only works within my app, trying to drag to
>any other app (including another instance of my app) does not work.
>
>Anyone has a clue why a dragging pasteboard is not being accepted
>anywhere but within the app that started the drag? This happens both
>from:
>
>- (BOOL)tableView:(NSTableView *)tv
> writeRows:(NSArray*)rows
> toPasteboard:(NSPasteboard*)pboard
>
>and from
>
>- (BOOL)outlineView:(NSOutlineView *)outlineView
> writeItems:(NSArray*)items
> toPasteboard:(NSPasteboard*)pboard

The question of whether a drop is accepted in another app has nothing to do
with tableView:writeRows:toPasteboard and so forth. All that does is allow
the drag to begin. When the drop reaches the other app, it must exhibit an
interest in at least one of the types on the pasteboard and ask for it.
When it does, you are called again with
draggingSourceOperationMaskForLocal:. *That* is where the decision is made
whether to allow a drop outside the app, based on the value of the boolean
parameter isLocal. I suggest you override this method in your NSTableView
subclass (and your NSOutlineView subclass) so that you can return the
permissible drag operations you desire. m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Services CMM Working in Cocoa & Carbon?
  • Next by Date: Re: Turn off sheet transparency
  • Previous by thread: Drag pasteboard only working within my app?
  • Next by thread: Re: PostgresQL [was : NSTableView : what about "footer" ?]
  • Index(es):
    • Date
    • Thread