Re: rightMouseDown: never called in NSView subclass
Re: rightMouseDown: never called in NSView subclass
- Subject: Re: rightMouseDown: never called in NSView subclass
- From: glenn andreas <email@hidden>
- Date: Fri, 26 Aug 2011 11:51:08 -0500
The App Store approval guidelines is pretty clear that the use of non-public API is grounds for rejection. NSToolbarView is undocumented, and therefore doing anything that depends on that class or its (undocumented) behavior would seem like grounds for rejection. This would include adding a category to replace a method (which is fraught with peril regardless - categories aren't designed to replace existing methods, since you can't guarantee the loading order of categories from OS release to OS release - including minor updates), subclassing, method swizzling, or even testing to see if an object is one of those undocumented classes.
And even if it gets accepted, there is no guarantee that when you need to make an emergency update to fix some critical bug that somehow slipped through or later arose that you'd get accepted that time.
On Aug 25, 2011, at 11:46 PM, Indragie Karunaratne wrote:
> 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).
Glenn Andreas email@hidden
The most merciful thing in the world ... is the inability of the human mind to correlate all its contents - HPL
_______________________________________________
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