Re: Position of NSStatusItem
Re: Position of NSStatusItem
- Subject: Re: Position of NSStatusItem
- From: Peter Maurer <email@hidden>
- Date: Thu, 22 Nov 2007 09:09:42 +0100
The output is: "0.000000/0.000000" ... don't really know what's
wrong with the code :-(
If you're willing to venture into undocumented goodness, you might
want to have a look at this little category I wrote for a menu bar
calendar that was supposed to appear right below its NSStatusItem
years ago:
//--
@implementation NSStatusItem (PMForbiddenFruit)
- (NSWindow*)window {
if ([self respondsToSelector: @selector(_window)]) {
return [self performSelector: @selector(_window)];
}
return nil;
}
- (NSRect)frameInScreenCoordinates {
NSWindow *theWindow = [self window];
if (theWindow) {
return [theWindow frame];
}
return NSZeroRect; // you better have a fallback strategy
}
@end
//--
Peter.
_______________________________________________
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