• 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: NSBrowser/NSMatrix as drag-and-drop source
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBrowser/NSMatrix as drag-and-drop source


  • Subject: Re: NSBrowser/NSMatrix as drag-and-drop source
  • From: Kevin Dorne <email@hidden>
  • Date: Thu, 26 May 2005 15:05:13 -0700

On Thu, May 26, 2005 at 03:56:33PM -0600, Nick Zitzmann wrote:
>
> On May 26, 2005, at 3:47 PM, Kevin Dorne wrote:
>
> >Following an example posted December 2003, I've added mouseDown and
> >mouseDragged methods to MyMatrix.  The issue is that if I have the
> >mouseDown method as below, I can't select multiple cells, but
> >dragging works.  If I just have the mouseDragged method, I can
> >select multiple cells, but dragging doesn't work.
> >
> >Is the code below correct, or am I going about this wrong?
>
> The code is correct, but it's incomplete. You need to add code to -
> mouseDown: to catch the case where the user is holding down Shift or
> Command when clicking, and if this is detected, then you need to
> manually extend the selection.

Ah, okay, so instead of

[self selectCellAtRow: row column: col];

I call

[self setSelectionFrom: row to: row anchor: anchor highlight: YES];

with the correct anchor depending on whether Shift or Command-clicked?
(I can't try this until I get home, sadly)

Cheers,
-k
 _______________________________________________
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

References: 
 >NSBrowser/NSMatrix as drag-and-drop source (From: Kevin Dorne <email@hidden>)
 >Re: NSBrowser/NSMatrix as drag-and-drop source (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: How to get an NSWindow from an NSDocument?
  • Next by Date: Re: NSTextView insertText & undo
  • Previous by thread: Re: NSBrowser/NSMatrix as drag-and-drop source
  • Next by thread: [SOLVED] Re: NSBrowser/NSMatrix as drag-and-drop source
  • Index(es):
    • Date
    • Thread