• 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: Dragging NSCells
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dragging NSCells


  • Subject: Re: Dragging NSCells
  • From: James DiPalma <email@hidden>
  • Date: Thu, 23 Jan 2003 18:06:48 -0800

From: The Amazing Llama <email@hidden>

For the record, I'm trying to implement dragging items in a tree view around within the tree view, or out to other tree views of the same type. I have sub-classed NSMatrix and NSBrowserCell, and hope implementing either to accept the drops. NSMatrix, being a view, will not be hard; but NSBrowserCell, being a cell, has none of the abilities I need.

What is a tree view?

If you mean an NSOutlineView like view, are you having trouble using NSOutlineView's dragging support? There is probably a sample project on your machine at

/Developer/Examples/Cocoa/DragNDropOutlineView

If you mean an NSBrowser like view, I've implemented one and would start by saying: it probably wasn't worth it and would completely rewrite NSBrowser instead of subclassing it. Summary of what I did:
- add drag support to an NSMatrix subclass
- use this matrix class in an NSBrowser subclass
- handle drop in NSBrowser (for drags outside of contained matrixes)

Biggest problems:
- getting mouseDown: to behave correctly for all types of matrixes
- handling data reloading efficiently and effectively
- getting selection change notifications for both NSMatrix and NSBrowser


-jim
_______________________________________________
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.

References: 
 >Dragging NSCells (From: The Amazing Llama <email@hidden>)

  • Prev by Date: Peer To Peer Design
  • Next by Date: Editable Cell in TableView
  • Previous by thread: Re: Dragging NSCells
  • Next by thread: Thread Safety and Cocoa
  • Index(es):
    • Date
    • Thread