Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Daemon with multiple instances of a nib

Daemon with multiple instances of a nib
Thread Tools
rudynorff
Junior Member
Join Date: Oct 2000
Location: Germany
Status: Offline
Reply With Quote
Feb 25, 2003, 02:26 PM
 
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
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Feb 25, 2003, 02:36 PM
 
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'."
     
rudynorff  (op)
Junior Member
Join Date: Oct 2000
Location: Germany
Status: Offline
Reply With Quote
Feb 25, 2003, 02:43 PM
 
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
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Feb 25, 2003, 03:32 PM
 
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'."
     
rudynorff  (op)
Junior Member
Join Date: Oct 2000
Location: Germany
Status: Offline
Reply With Quote
Feb 26, 2003, 03:05 PM
 
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
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Feb 26, 2003, 04:19 PM
 
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.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 09:26 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,