• 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: NSStatusBar generates Sigtrap
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSStatusBar generates Sigtrap


  • Subject: Re: NSStatusBar generates Sigtrap
  • From: Rosyna <email@hidden>
  • Date: Tue, 2 Aug 2005 08:57:21 -0700

There's no NSApplication instance here. And probably no connection to the window server. And defnitely no Autorelease pool.

Put this code in a class and use NSApplicationMain() in main().

And you don't need to retain the systemStatusBar (not that it should be valid in this case).

Ack, at 8/2/05, Michael Gruetzner said:

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:

--


Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People
_______________________________________________
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


References: 
 >NSStatusBar generates Sigtrap (From: Michael Gruetzner <email@hidden>)

  • Prev by Date: range from link
  • Next by Date: Re: range from link
  • Previous by thread: Re: NSStatusBar generates Sigtrap
  • Next by thread: Re: NSStatusBar generates Sigtrap
  • Index(es):
    • Date
    • Thread