• 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
NSTableView dragging vrs NSOutlineView dragging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView dragging vrs NSOutlineView dragging


  • Subject: NSTableView dragging vrs NSOutlineView dragging
  • From: Jesse Grosjean <email@hidden>
  • Date: Fri, 10 Dec 2004 13:05:30 -0500

The dragging support provided by NSTableView is different then that provided by NSOutlineView, I want to know how to make them act the same. Here is the situation:

Create a table and outline view and set one of the columns in each to contain a slider cell. At this point both views work the same. Click on a slider and that sliders row will be selected and dragging will change the slider value.

The problem happens when dragging is enabled. To enable dragging add these two methods to the respective data sources and return yes.

- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items toPasteboard:(NSPasteboard *)pboard
- (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray *)rows toPasteboard:(NSPasteboard *)pboard


The NSOutlineView continues to work as described above. When you click on the slider cell and drag that row is selected and the slider handle is dragged. But if you do the same thing in the NSTableView you'll get a different behavior. Clicking and dragging on a slider cell in the table view will start a new row drag, the row won't be selected, and the slider value will not change.

I would like to make it so that the table view behaves like the outline view in this case. I have a couple of ideas for hacks, but would like to do this the correct (and preferable same as NSOutlineView) way. Does anyone know how and where NSOutlineView is making this customization?

Thanks,
Jesse

_______________________________________________
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


  • Prev by Date: Re: Kill other process's warning dialog
  • Next by Date: Re: Aqua icons from system fonts
  • Previous by thread: Re: Dates and time zones
  • Next by thread: "final" string validation in custom NSFormatter
  • Index(es):
    • Date
    • Thread