|
|
Daemon with multiple instances of a nib
|
|
|
|
Junior Member
Join Date: Oct 2000
Location: Germany
Status:
Offline
|
|
Hello,
I want to write an application that gets notifications (NSDistributedNotification) from a standard cocoa app.
The application should be stg like a daemon (running in the background) and only pop up an instance of a nib when a notification is received. so for each notification it should pop up a new window (from the same nib). can anybody tell me roughly what kind of project i have to choose and guide me thru the steps? i have tried to do it on my own but it doesn't work.
oh, one more thing: no window must open at the start of the daemon, only when a notification gets send from the other app.
thanks for your help!
rudy
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
It sounds like a standard Cocoa app should work. Just put an observer in your MainMenu.nib and have it load your other nib whenever it gets the notification.
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Junior Member
Join Date: Oct 2000
Location: Germany
Status:
Offline
|
|
Originally posted by Chuckit:
It sounds like a standard Cocoa app should work. Just put an observer in your MainMenu.nib and have it load your other nib whenever it gets the notification.
Hello,
thanks for the quick answer!
you're right it should, but how do i avoid that it automatically opens a new window when I start it?
rudy
|
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
A window is placed in MainMenu.nib by default. Just delete it and it won't open. (Er...the window, that is. Not the nib.)
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
|
|
|
|
|
|
|
Junior Member
Join Date: Oct 2000
Location: Germany
Status:
Offline
|
|
Originally posted by Chuckit:
A window is placed in MainMenu.nib by default. Just delete it and it won't open. (Er...the window, that is. Not the nib.)
oh man!
i hope nobody read my post, i must have been on drugs yesterday (or maybe i drank to much cocoa
thank you chuckit!
- rudy
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Be warned that applications may be terminated when the current user logs out, especially if they were started with a connection to the windowserver. Since you said you were writing a daemon, that might be a problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|