NSStatusBar generates Sigtrap
NSStatusBar generates Sigtrap
- Subject: NSStatusBar generates Sigtrap
- From: Michael Gruetzner <email@hidden>
- Date: Tue, 2 Aug 2005 17:21:21 +0200
Hello,
I've tried to add an item to the status bar. Therefore I wrote this
tiny program:
int main(int argc, char *argv[]) {
NSStatusItem *item;
NSStatusBar *bar = [[NSStatusBar systemStatusBar]retain];
item = [bar statusItemWithLength : NSVariableStatusItemLength];
[item retain];
[item setTitle: NSLocalizedString(@"Tablet",@"")];
[item setHighlightMode:YES];
[item setMenu:theMenu];
return 0;
}
I took the code from the example on the cocoa documentation. When I run
the code, the following happens:
Executable “event” has exited due to signal 5 (SIGTRAP).
[Session started at 2005-08-02 17:01:36 +0200.]
2005-08-02 17:01:37.130 event[2845] *** _NSAutoreleaseNoPool(): Object
0x325e80 of class NSCFString autoreleased with no pool in place - just
leaking
2005-08-02 17:01:37.131 event[2845] *** _NSAutoreleaseNoPool(): Object
0x325de0 of class NSException autoreleased with no pool in place - just
leaking
2005-08-02 17:01:37.132 event[2845] *** Uncaught exception:
<NSInternalInconsistencyException> Error (1002) creating CGSWindow
Executable “event” has exited due to signal 5 (SIGTRAP).
I have no Idea, what causes the abnormal termination. Can anybody help?
Thank you in advance for any hint!
MfG
Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden