FROM : Hamish Allan
DATE : Sun Jun 15 21:38:57 2008
On Sat, Jun 14, 2008 at 8:52 PM, dream cat7 <<email_removed>> wrote:
> Seeing notifications from outside:
> [...]
> Sometimes 2 process are
> communicating And one of them is launching / closing multiple times during
> the session (e.g. sending kill message as NSNotification).
You refer to NSNotification many times in your post, but
NSDistributedNotification only once or twice; I assume from the
context that you always mean the latter.
> Indeed I am not shifting around any large volumes of data at the moment, it
> is maybe 10 or so application preferences settings, with a 2-3 of data
> objects which are archived with NSCoding/NSArchiver protocol. However as my
> application becomes more enhanced, there may be significantly more such
> "medium size" data object.
Why not put the data files somewhere else, i.e., Library/Application
Support? Then you can distinguish between changes in preferences and
changes in data, break down the atomicity of your data as far as you
like, easily write Spotlight plugins, etc.
> With a launchd - administered process they can be started at any time. But
> is it reasonable to believe that the daemon can start running before the
> NSNotification centre and then some time after it started that it can
> register with the notification centre when it becomes available ?
I don't know, but I'd imagine that if you call
+[NSDistributedNotificationCenter defaultCenter] before the center
exists, it will be created.
Hamish
DATE : Sun Jun 15 21:38:57 2008
On Sat, Jun 14, 2008 at 8:52 PM, dream cat7 <<email_removed>> wrote:
> Seeing notifications from outside:
> [...]
> Sometimes 2 process are
> communicating And one of them is launching / closing multiple times during
> the session (e.g. sending kill message as NSNotification).
You refer to NSNotification many times in your post, but
NSDistributedNotification only once or twice; I assume from the
context that you always mean the latter.
> Indeed I am not shifting around any large volumes of data at the moment, it
> is maybe 10 or so application preferences settings, with a 2-3 of data
> objects which are archived with NSCoding/NSArchiver protocol. However as my
> application becomes more enhanced, there may be significantly more such
> "medium size" data object.
Why not put the data files somewhere else, i.e., Library/Application
Support? Then you can distinguish between changes in preferences and
changes in data, break down the atomicity of your data as far as you
like, easily write Spotlight plugins, etc.
> With a launchd - administered process they can be started at any time. But
> is it reasonable to believe that the daemon can start running before the
> NSNotification centre and then some time after it started that it can
> register with the notification centre when it becomes available ?
I don't know, but I'd imagine that if you call
+[NSDistributedNotificationCenter defaultCenter] before the center
exists, it will be created.
Hamish
| Related mails | Author | Date |
|---|---|---|
| dream cat7 | Jun 14, 21:52 | |
| Nathan Kinsinger | Jun 14, 23:27 | |
| Jens Alfke | Jun 15, 05:56 | |
| Michael Ash | Jun 15, 06:20 | |
| dreamcat7 | Jun 15, 12:18 | |
| Hamish Allan | Jun 15, 21:38 | |
| Andrew Farmer | Jun 15, 23:29 |






Cocoa mail archive

