• 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 (bis): 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 (bis): How does Cocoa determine a click in a cell can start a drag operation?


  • Subject: NSOutlineView (bis): 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 17:33:40 +0100

Question:
---------

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

And how can I tell it to allow that 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.


P.S:

Sorry for the repost but the mailing server did not seem to have taken into account this post at the time of this reposting.



_______________________________________________

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


  • Follow-Ups:
    • Re: NSOutlineView (bis): How does Cocoa determine a click in a cell can start a drag operation?
      • From: Benjamin Stiglitz <email@hidden>
  • Prev by Date: Re: Shift-tab in window not working correctly
  • Next by Date: Re: programming in C++ ?
  • Previous by thread: Re: Shift-tab in window not working correctly
  • Next by thread: Re: NSOutlineView (bis): How does Cocoa determine a click in a cell can start a drag operation?
  • Index(es):
    • Date
    • Thread