• 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 and drop between two tables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drag and drop between two tables


  • Subject: Re: drag and drop between two tables
  • From: Daniel Todd Currie <email@hidden>
  • Date: Fri, 29 Oct 2004 19:02:31 -0700

Here's the example you are looking for:

/Developer/Examples/AppKit/DragNDropOutlineView

Frankly though, I found it much easier to simply implement:

- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
- (void)draggingExited:(id <NSDraggingInfo>)sender
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender

See what happens, put in some NSLogs, try returning some different values, you'll get the hang of it more easily by trial and error.

Also, the docs are quite helpful:

http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/

-- DTC


On 2004 Oct 29, at 14:56, Benjámin Salánki wrote:

Hi to all,

I have a little window with two NSTableViews I subclassed to fit my needs. Now I want to drag and drop table rows from one table to the other so that the row gets copied and not moved, but this should only be a one way operation.

Could anyone please point me towards some sample code that could get me into this subject?

Thanks,
Ben

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >drag and drop between two tables (From: Benjámin Salánki <email@hidden>)

  • Prev by Date: How do I get the compiler to warn me if I forget to return self?
  • Next by Date: Re: Preventing Xcode to include header files
  • Previous by thread: drag and drop between two tables
  • Next by thread: Preventing Xcode to include header files
  • Index(es):
    • Date
    • Thread