Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView clickable area



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@hidden> 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@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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: NSView clickable area (From: email@hidden (Christian Schmitz))



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.