You have not set a custom view for your status element, so the call viewwill return zero.
I'm going to suggest that the reason you want to find out the location is when you click on the status item.
If you were to perform an action for your status element, it might look like this:
- (IBAction)someAction:(id)sender
{
NSWindow *window = [[[NSApplication sharedApplication] currentEvent] window];
NSRect rect = [window frame];
NSLog(@"%f",rect.origin.y);
}
and then you set the action of the status element as follows:
[statusItem setAction:@selector(someAction:)]
and then whenever you click on your status, you will see something like this in your journal:
2012-04-17 20:40:24.344 test[337:403] 1578.000000
, , (, Matt Gemmell MAAttachedWindow) .