Skip navigation.
 
mlRe: NSStatusItem position problem
FROM : Federico
DATE : Mon Nov 26 20:06:28 2007

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

Related mailsAuthorDate
mlRe: NSStatusItem position problem Federico Nov 26, 20:06
mlRe: NSStatusItem position problem Uli Kusterer Nov 27, 15:24
mlRe: NSStatusItem position problem [nexUmoja] Fabian… Dec 5, 17:20
mlRe: NSStatusItem position problem [nexUmoja] Fabian… Dec 11, 21:12