Skip navigation.
 
mlRe: NSView clickable area
FROM : Mike Abdullah
DATE : Sun Nov 18 18:06:48 2007

Does the -[NSView hitTest:] method shed any light on the situation?

Mike.

On 18 Nov 2007, at 07:12, Christian Schmitz wrote:

> Shawn Erickson <<email_removed>> wrote:
>

>> Well pretty much all of Mac OS X hit detection works considering
>> opacity. I bet you can use a white fill at like 5% or a little more 
>> to
>> get the OS to do the hit detection you want without making it visible
>> to the user.

>
> I found that work around, but I'm still looking for the root of this
> problem.
>
> When I copy this code:
>
>
> NSStatusBar *statusbar=[NSStatusBar systemStatusBar];
> NSStatusItem* menuItem=[statusbar statusItemWithLength:-1];
>
> if (menuItem)
>        {
>        [menuItem retain];
>        [menuItem setTitle:@"Test"];
>        [menuItem setHighlightMode:YES];
>        }
>
> to my app or to a new cocoa app in Xcode it will work in the Cocoa 
> app,
> but fail in my app. This opacity hit testing seems to be off by 
> default
> and something switches it on for my application in some of the other
> frameworks, but I have no idea on how they do it and on what to look 
> for
> to fix it.
>
> Gruß
> Christian
>
> --
> Over 900 classes with 17000 functions in one REALbasic plug-in.
> The Monkeybread Software Realbasic Plugin v7.6.
>
> <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml>
> _______________________________________________
>
> Cocoa-dev mailing list (<email_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>

Related mailsAuthorDate
mlNSView clickable area applelists Nov 18, 07:30
mlRe: NSView clickable area Shawn Erickson Nov 18, 07:37
mlRe: NSView clickable area applelists Nov 18, 08:12
mlRe: NSView clickable area Mike Abdullah Nov 18, 18:06