FROM : Peter Maurer
DATE : Thu Nov 22 09:09:42 2007
> 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.
DATE : Thu Nov 22 09:09:42 2007
> 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.
| Related mails | Author | Date |
|---|---|---|
| [nexUmoja] Fabian… | Nov 19, 23:14 | |
| Joachim Deelen | Nov 20, 22:11 | |
| Joachim Deelen | Nov 20, 22:57 | |
| [nexUmoja] Fabian… | Nov 20, 23:03 | |
| Joachim Deelen | Nov 20, 23:34 | |
| [nexUmoja] Fabian… | Nov 20, 23:59 | |
| Peter Maurer | Nov 22, 09:09 | |
| [nexUmoja] Fabian… | Nov 22, 11:37 | |
| Joachim Deelen | Nov 23, 23:26 | |
| [nexUmoja] Fabian… | Nov 24, 03:18 |






Cocoa mail archive

