• 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: Need the Why and How of mouseDragged:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need the Why and How of mouseDragged:


  • Subject: Re: Need the Why and How of mouseDragged:
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 14 Dec 2007 07:40:30 -0800


On 2007 Dec, 13, at 11:09, Alastair Houghton wrote:

If your superclass is NSView, you don't need to forward the message to super.

As for the -setEnabled: thing, the default behaviour is probably to track the mouse until mouse up, but only if -enabled is YES. I can't say I've noticed this before myself, because I don't tend to forward -mouseDown: to super where super is a plain NSView.

Thanks, Alastair. Your explanation makes sense.

Since my object is specifically an NSControl (subclass of NSView), I had been doing forwarding mouseDown: to super in order to get an action sent. The solution I used is to replace

  [super mouseDown:event] ;

with

  [self sendAction:[self action] to:[self target]] ;

All seems to be working fine now.
_______________________________________________

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


References: 
 >Need the Why and How of mouseDragged: (From: Jerry Krinock <email@hidden>)
 >Re: Need the Why and How of mouseDragged: (From: Alastair Houghton <email@hidden>)
 >Re: Need the Why and How of mouseDragged: (From: "Adam R. Maxwell" <email@hidden>)
 >Re: Need the Why and How of mouseDragged: (From: Jerry Krinock <email@hidden>)
 >Re: Need the Why and How of mouseDragged: (From: Alastair Houghton <email@hidden>)
 >Re: Need the Why and How of mouseDragged: (From: Jerry Krinock <email@hidden>)
 >Re: Need the Why and How of mouseDragged: (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: CoreData huge memory usage - is this right ?
  • Next by Date: Re: CoreData huge memory usage - is this right ?
  • Previous by thread: Re: Need the Why and How of mouseDragged:
  • Next by thread: printf
  • Index(es):
    • Date
    • Thread