• 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
NSOutlineView: How does Cocoa determine a click in a cell can start a drag operation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOutlineView: How does Cocoa determine a click in a cell can start a drag operation?


  • Subject: NSOutlineView: How does Cocoa determine a click in a cell can start a drag operation?
  • From: Stéphane Sudre <email@hidden>
  • Date: Sun, 3 Feb 2008 13:55:06 +0100

Question:
---------

How does Cocoa determine a click in a cell can start a drag operation?

And how can I tell it to allow a NSButtonCell can be clicked to start a drag operation?

Problem:
--------

I have a NSOutlineView with 3 columns. The first column has its data cell to a subclass of NSButtonCell to display a checkbox (with a label)

+--------------------+-----------+-----------+
| [ ] My checkbox    | My Label  | My Label  |
| [ ] My checkbox    | My Label  | My Label  |
+--------------------+-----------+-----------+

All the columns and data cells are set to be non editable.

The subclass of NSButtonCell overloads - (BOOL) trackMouse:inRect:ofView:untilMouseUp: so that the cell does not respond to clicks.

Now this doesn't seem to be enough as a click on a cell of the first column can not start a drag operation.

If I disabled the cell, a click can start the drag operation.

Current Investigation Results:
------------------------------

- Mailing list archives: nothing relevant

- Google: nothing obviously relevant

- GNUStep source code: Apparently, returning NO for - (BOOL) trackMouse:inRect:ofView:untilMouseUp: should be enough.

- Medium: overloading - (BOOL) trackMouse:inRect:ofView:untilMouseUp: is apparently enough for an Apple tool.

- Advanced Medium: Provided a potential solution involving an API from the NeXT world.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: receiving a file on app startup
  • Next by Date: Re: newbie: question: i have a memory leak: obj-c 2.0: modification of program in "Cocoa with Objective-C"
  • Previous by thread: Re: newbie: question: i have a memory leak: obj-c 2.0: modification of program in "Cocoa with Objective-C"
  • Next by thread: Making 'return' Begin Editing, like Finder does
  • Index(es):
    • Date
    • Thread