• 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-Post: Dragging out of an NSBrowser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re-Post: Dragging out of an NSBrowser


  • Subject: Re-Post: Dragging out of an NSBrowser
  • From: Michael Becker <email@hidden>
  • Date: Fri, 21 Nov 2003 20:42:18 +0100

Hello!

I am posting this again, hoping that somebody could give me a least a little push into the right direction. Thanks!

Hi!

I am trying to kind of rebuild the Finder, only in a very limited way. I have an NSBrowser that displays the file structure on the harddisk. Now I would like to let people drag files out of the NSBrowser into an NSTableView. You can already drag and drop into the TableView from "outside", i.e. the "real" finder.

I tried to subclass NSBrowser and implement draggingSourceOperationMaskForLocal: and mouseDragged: (as I read it in a book about views in general). But it seems that those methods aren't even called. Thus my question: What are the hidden secrets when trying to drag out of an NSBrowser, i.e. to drag an NSBrowserCell? How do I go about it?

Update: I disabled "multiple selection" for my Browser, and now the mouseDragged: method gets called, but nothing else happens. Strangely enough: I hardcoded the path of the file to be dragged and whenever I drag from anywhere in the Browser-object EXCEPT from the BrowserCells the drag and drop works. So I guess that the NSBrowserCell is causing the trouble...

I am also surprised that there's so little information about that exact topic as I figured that this is something that occurs in projects quite often (e.g. in an FTP-Client that supports drag and drop etc.)

Bye,
Michael
_______________________________________________
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.

  • Follow-Ups:
    • Re: Re-Post: Dragging out of an NSBrowser
      • From: Brian Webster <email@hidden>
  • Prev by Date: Re: Problem Ejecting Discs
  • Next by Date: NSLayoutManager and NSTextView problems
  • Previous by thread: Getting Modifier Flags in Timer Generated Event Processing
  • Next by thread: Re: Re-Post: Dragging out of an NSBrowser
  • Index(es):
    • Date
    • Thread