• 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
-mouseDownFlags while dragging over NSCells returns 0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-mouseDownFlags while dragging over NSCells returns 0


  • Subject: -mouseDownFlags while dragging over NSCells returns 0
  • From: Roland Torres <email@hidden>
  • Date: Tue, 3 Apr 2007 13:28:51 -0700

I have a 64x64 NSMatrix of NSCells. I've subclassed NSCell to capture the -drawWithFrame:inView: invocations so I can change the color of the cells that the user clicks on. This works great.

Now I need to color the cells by clicking and dragging the mouse over them (not explicitly clicking on each one, just a downclick on the first one, and an upclick on the last one), but I don't know how to find out (from within NSCell's -drawWithFrame:inView: method) that I'm in a mouse down state. The -mouseDownFlags method returns nonzero only when the mouse is downclicked on the first cell, but the other cells that get dragged over return 0.

Is there some way to know, when an NSCell's -drawWithFrame:inView: method gets invoked, that it's in a mouseDown event?

Roland

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: -mouseDownFlags while dragging over NSCells returns 0
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Re: NSTimer
  • Next by Date: Re: Rendering an Array Controller contents outside an NSTableView
  • Previous by thread: Re: NSTimer
  • Next by thread: Re: -mouseDownFlags while dragging over NSCells returns 0
  • Index(es):
    • Date
    • Thread