• 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: rightMouseDown: never called in NSView subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rightMouseDown: never called in NSView subclass


  • Subject: Re: rightMouseDown: never called in NSView subclass
  • From: Indragie Karunaratne <email@hidden>
  • Date: Thu, 25 Aug 2011 22:46:49 -0600

Is there any other way to do this aside from what I'm doing right now? As far as I know, I have two choices:

a) Use this method and risk something breaking
b) Write an NSToolbar clone

I know the risks, but if I could get this to pass through Mac App Store submission then I'd rather deal with possibility of something breaking later on that than to rewrite NSToolbar. The one last thing I can think of is to use the ObjC runtime to retain the original implementation, swizzle hitTest: and check whether my view is under the cursor, and if not, just call the original implementation. However, method swizzling always feels like a dirty workaround so I'm not sure if it would be much better than this (and if it would be acceptable in the MAS).

On 2011-08-25, at 10:40 PM, Quincey Morris wrote:

> Ah, well, yes, if IB doesn't expose the class you need, that makes subclassing impractical. But in that case, replacing the NSToolbarView method seems even more undesirable.
>
>
> On Aug 25, 2011, at 20:55 , Indragie Karunaratne wrote:
>
>> I'm not sure how I would get NSToolbar to use my subclass of NSToolbarView. I can't set the class of the toolbar *view* itself in IB (nor programatically, as far as I know), because NSToolbarView is a private class that NSToolbar uses to implement the UI. I can of course change the class of the NSToolbar object itself to a subclass, but this wouldn't help me much as there is no public NSToolbar method that allows me to change the class of its view.
>
>

_______________________________________________

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: rightMouseDown: never called in NSView subclass
      • From: glenn andreas <email@hidden>
    • Re: rightMouseDown: never called in NSView subclass
      • From: Mark Munz <email@hidden>
References: 
 >rightMouseDown: never called in NSView subclass (From: Indragie Karunaratne <email@hidden>)
 >Re: rightMouseDown: never called in NSView subclass (From: Kyle Sluder <email@hidden>)
 >Re: rightMouseDown: never called in NSView subclass (From: Indragie Karunaratne <email@hidden>)
 >Re: rightMouseDown: never called in NSView subclass (From: Ken Thomases <email@hidden>)
 >Re: rightMouseDown: never called in NSView subclass (From: Indragie Karunaratne <email@hidden>)
 >Re: rightMouseDown: never called in NSView subclass (From: Corbin Dunn <email@hidden>)
 >Re: rightMouseDown: never called in NSView subclass (From: Indragie Karunaratne <email@hidden>)
 >Re: rightMouseDown: never called in NSView subclass (From: Raleigh Ledet <email@hidden>)
 >Re: rightMouseDown: never called in NSView subclass (From: Indragie Karunaratne <email@hidden>)
 >Re: rightMouseDown: never called in NSView subclass (From: Quincey Morris <email@hidden>)
 >Re: rightMouseDown: never called in NSView subclass (From: Indragie Karunaratne <email@hidden>)
 >Re: rightMouseDown: never called in NSView subclass (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: rightMouseDown: never called in NSView subclass
  • Next by Date: Re: "iTunes Music Library.xml" won't load with dictionaryWithContentsOfFile:
  • Previous by thread: Re: rightMouseDown: never called in NSView subclass
  • Next by thread: Re: rightMouseDown: never called in NSView subclass
  • Index(es):
    • Date
    • Thread