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
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 mails | Author | Date |
|---|---|---|
| Federico | Nov 26, 20:06 | |
| Uli Kusterer | Nov 27, 15:24 | |
| [nexUmoja] Fabian… | Dec 5, 17:20 | |
| [nexUmoja] Fabian… | Dec 11, 21:12 |






Cocoa mail archive

