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

Re: Position of NSStatusItem


  • Subject: Re: Position of NSStatusItem
  • From: "[nexUmoja] Fabian Jäger" <email@hidden>
  • Date: Thu, 22 Nov 2007 11:37:48 +0100

Hey,
your methods are more or less the same what I already tried. And they lead to the same result... no screen coordinates. Maybe Apple changed something in the NSStatusItem's window?!
It is really weird, because there are some solutions out there that seem to have worked, but do not work for me :-(


Fabian


On 22.11.2007, at 09:09, Peter Maurer wrote:

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


References: 
 >Position of NSStatusItem (From: "[nexUmoja] Fabian Jäger" <email@hidden>)
 >Re: Position of NSStatusItem (From: Joachim Deelen <email@hidden>)
 >Re: Position of NSStatusItem (From: Joachim Deelen <email@hidden>)
 >Re: Position of NSStatusItem (From: "[nexUmoja] Fabian Jäger" <email@hidden>)
 >Re: Position of NSStatusItem (From: Peter Maurer <email@hidden>)

  • Prev by Date: Re: QTMovieLayer and renderInContext:
  • Next by Date: Re: QTMovieLayer and renderInContext:
  • Previous by thread: Re: Position of NSStatusItem
  • Next by thread: Re: Position of NSStatusItem
  • Index(es):
    • Date
    • Thread