• 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: NSStatusItem position problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSStatusItem position problem


  • Subject: Re: NSStatusItem position problem
  • From: Federico <email@hidden>
  • Date: Mon, 26 Nov 2007 20:06:28 +0100

This code found in the mailing list:

@interface NSStatusItem (Hack)
- (NSRect)hackFrame;
@end

@implementation NSStatusItem (Hack)
- (NSRect)hackFrame
{
    return [_fWindow frame];
}
@end

With this:
NSLog(@"Menu coords x: %f, y: %f\n", [myStatusItem hackFrame].origin.x, [myStatusItem hackFrame].origin.x);


prints "x: -30.000 y: -30.000"

but the menu is not at that coordinates on the screen...

How can I get the coordinates on the screen of my NSStatusItem?

Federico
_______________________________________________

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: NSStatusItem position problem
      • From: Uli Kusterer <email@hidden>
  • Prev by Date: Re: Loading View in Placeholder upon startup
  • Next by Date: Re: UTI's and document packages
  • Previous by thread: Re: More GC. Now with NSData
  • Next by thread: Re: NSStatusItem position problem
  • Index(es):
    • Date
    • Thread