Re: Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus)
Re: Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus)
- Subject: Re: Screen Coordinates of Menu. Use CTM? (was: Give menu keyboard focus)
- From: Graham Cox <email@hidden>
- Date: Mon, 10 Oct 2011 16:47:16 +1100
You could use [NSMenuItem setView:] with a temporary view which would presumably be hooked up to the underlying window internally, grab its window, then set it back to nil???
A hack, but not as bad as the original one :)
--Graham
On 10/10/2011, at 4:41 PM, Jerry Krinock wrote:
>
> On 2011 Oct 09, at 19:57, Seth Willits wrote:
>
>> The status icon/view in the menu bar is in a window. You can thus get that window's coordinates by [[[statusItem view] window] frame].
>
> Thank you, Seth. I wish it were so.
>
> But [statusItem view] returns nil for me. And the documentation explains that the 'view' of a status item is an optional custom view which overrides the regular menu behavior.
>
> _______________________________________________
>
> 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
_______________________________________________
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