Re: Background application
Re: Background application
- Subject: Re: Background application
- From: Thomas Finley <email@hidden>
- Date: Wed, 2 Jul 2003 13:18:33 -0400
On Wednesday, July 2, 2003, at 12:25 PM, Sujal Shah wrote:
First, can I use a nib to create the status item? I don't see a
palette
item, so the answer seems to be no. How about the menu?
You must create the NSStatusItem yourself, but you may reference a menu
created in a nib to set the status item's menu.
The main issue now is how to create the cocoa APIs from the CF app.
Are
there any pointers on setting up the Autorelease pool? Is there
anything else that I need to do to efficiently deal with Cocoa api
calls
from within my CFRunLoop?
Up until now, all the apps I've written to learn the APIs have used
NSApplicationMain and hidden all these details. This is the first
non-GUI application I've written so this is very new to me.
Any suggestions?
"Non-GUI?" But it is a GUI app. Its GUI is limited to a status item,
but it's still a GUI app.
This might sound simplistic, but since you're trying to make a Cocoa
app that runs in the background, why don't you make a Cocoa app that
runs in the background? ;) I've been writing a little
status-item-interface-only utility myself, and it's quite simple:
1. Create a Cocoa app.
2. In your target plist settings, set NSBGOnly to have the string value
of "1".
3. There is no step three.
Otherwise it is exactly the same. I have objects in the nib of the app
that get initialized, and they monitor the system, and see that the
status item displays and removes itself periodically depending on
several factors.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.