• 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: NSNotificationCenter not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSNotificationCenter not working


  • Subject: Re: NSNotificationCenter not working
  • From: Matt Jaffa <email@hidden>
  • Date: Thu, 1 Apr 2004 17:18:53 -0700

Is it possible to use shared memory with this solution,

I have it working for my daemon now, but have yet to hook
up in the System Preferences plugin,

can shared memory cross sessions?

Matt


On Apr 1, 2004, at 11:13 AM, Chris Parker wrote:

On Apr 1, 2004, at 2:28 AM, Stephane Sudre wrote:

On Thursday, April 1, 2004, at 08:53 AM, Matt Jaffa wrote:

no I changed both of them to MFInvertOff
So they should be the same.

IIRC, a bootstrap daemon is not supposed to answer to notifications even distributed ones. Security reason I guess.

In Matt's original message, he wrote:

I have two apps running, one is my StartupDaemon and the other is a
System Preference plug-in I made,
When I click on this button I want it to send a notification, that the
Daemon can pick up on,

I'm assuming this means his startup daemon is running as root - in which case by default distributed notifications won't cross session boundaries.

The NSDistributedNotificationCenter documentation was updated for Panther:

http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSDistributedNotifctnCtr.html#//apple_ref/doc/ uid/20000396/BBCCIIEI

which points at:

- (void)postNotificationName:(NSString *)name object:(NSString *)object userInfo:(NSDictionary *)userInfo options:(unsigned)options;

One of the options is NSNotificationPostToAllSessions. This new API allows the process to decide how wide a distribution its notifications get.

.chris

--
Chris Parker
Cocoa Frameworks Engineer
Apple Computer, Inc.
_______________________________________________
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.
_______________________________________________
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.


  • Follow-Ups:
    • Re: NSNotificationCenter not working
      • From: Matt Jaffa <email@hidden>
References: 
 >Re: NSNotificationCenter not working (From: Stephane Sudre <email@hidden>)
 >Re: NSNotificationCenter not working (From: Chris Parker <email@hidden>)

  • Prev by Date: Re: Threads and locks
  • Next by Date: Is the internet avaliable question
  • Previous by thread: Re: NSNotificationCenter not working
  • Next by thread: Re: NSNotificationCenter not working
  • Index(es):
    • Date
    • Thread