search
of this list, to see if anyone else was having the same problem) the Radar was
opened in 2011 - which should be enough time to squish the bug!
I'm trying to use NSDistributedNotificationCenter to communicate between two
apps. The app posting the notification does it as follows
the bug!
I'm trying to use NSDistributedNotificationCenter to communicate between two
apps. The app posting the notification does it as follows:
NSDistributedNotificationCenter *centre = [NSDistributedNotificationCenter
defaultCenter];
NSDictionary *dict = [NSDictionary dictionaryWithObject
the bug!
I'm trying to use NSDistributedNotificationCenter to communicate between two
apps. The app posting the notification does it as follows:
NSDistributedNotificationCenter *centre = [NSDistributedNotificationCenter
defaultCenter];
NSDictionary *dict = [NSDictionary dictionaryWithObject
I have a Helper Tool, running as root, started via SMJobBless and communicating
vie Xpc.
Sometimes it does:
[[NSOperationQueue mainQueue] addOperationWithBlock:^
{
NSDistributedNotificationCenter *d = [
NSDistributedNotificationCenter defaultCenter
mainQueue] addOperationWithBlock:^
{
NSDistributedNotificationCenter *d = [
NSDistributedNotificationCenter defaultCenter ];
NSLog(@%s will postNotificationName on %@,__FUNCTION__,d);
// prints: CFNotificationCenter 0x7f9f
, Gerriet M. Denkmann gerr...@mdenkmann.de
wrote:
I have a Helper Tool, running as root, started via SMJobBless and
communicating vie Xpc.
Sometimes it does:
[[NSOperationQueue mainQueue] addOperationWithBlock:^
{
NSDistributedNotificationCenter *d
Something like this?
static NSAutoreleasePool *pool = nil;
void runloop(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void
*info) {
if (activity kCFRunLoopEntry) {
if (pool!=nil) [pool drain];
pool = [NSAutoreleasePool new];
} else
I noticed that memory is not autoreleased when I receive a distributed
notification, the only way to fix this is to wrap it in a autorelease pool, but
this shouldn't be right? I would think that when you register for a
notification it'll be on the run loop which has a autorelease pool and
On 18 Feb 2011, at 3:00 PM, Mr. Gecko wrote:
I noticed that memory is not autoreleased when I receive a distributed
notification, the only way to fix this is to wrap it in a autorelease pool,
but this shouldn't be right? I would think that when you register for a
notification it'll be on
I know that you think I'm some noob at this. This may be true, but I am aware
that Instruments shows that the memory I allocated during that distributed
notification is still there. I know this because it's a 9MB allocation and it's
in a NSData with no copy bytes and free when released. The one
More information found. This may be a bug. I found this really cool method for
NSAutoreleasePools called showPools. It is really useful for something like
this. I found that it has a autorelease pool, but it never drains. It just
gains items until it gets to 1016 items and then I don't know
On Feb 18, 2011, at 3:00 PM, Mr. Gecko wrote:
I noticed that memory is not autoreleased when I receive a distributed
notification, the only way to fix this is to wrap it in a autorelease pool,
but this shouldn't be right? I would think that when you register for a
notification it'll be on
That may be the problem as this is a UIAgent and not a real GUI. The only GUI
that appears is when you first open it or you open it again to change settings.
I have many other types of notifications I'm listening for such as carbon
events and accessibility events, but I don't know if they are
Yes, that would be it, when I open the UI it releases the pool. Is there a way
to prevent this from happening just incase I have other things that are
autoreleasing to it?
On Feb 18, 2011, at 8:20 PM, Ken Thomases wrote:
Is your application getting any real GUI-style events, or is it only
On Fri, Feb 18, 2011 at 7:36 PM, Mr. Gecko grmrge...@gmail.com wrote:
Yes, that would be it, when I open the UI it releases the pool. Is there a
way to prevent this from happening just incase I have other things that are
autoreleasing to it?
Nest your own autorelease pool. You can use a
Here is some proof that it is still in memory, I waited about 5 minutes and it
didn't dealloc automatically like you said it will...
inline: PastedGraphic-1.png
When I wrap a NSAutoreleasePool around the notification method, it releases as
expected. I cannot have my application doing this as it
unable to notify the application that the work is done.
Nothing happens.
At the end of my main.m:
NSDistributedNotificationCenter *dnc =
[NSDistributedNotificationCenter defaultCenter];
[dnc addObserver:hardDetect selector:@selector(getBootInfo:)
name:@getBootInfo object:nil
On Oct 23, 2009, at 8:37 AM, Zephyroth Akash wrote:
It works fine, the tool get the notification and do its work ... but
I'm unable to notify the application that the work is done.
Are you posting another notification from your tool back to the
application?
In the code you posted I'm not
Début du message réexpédié :
De : Zephyroth Akash zephyroth.os...@gmail.com
Date : 23 octobre 2009 17:59:48 HAEC
À : Jens Alfke j...@mooseyard.com
Objet : Rép : Foundation Tool and NSDistributedNotificationCenter
The tool launch the application.
The application post a notification
On 2009 Oct 23, at 08:37, Zephyroth Akash wrote:
[[NSRunLoop currentRunLoop] run];
I believe you need to read All About Run Loops...
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html#/
I have a background process that when started manually talks correctly
with the GUI app using NSDistributedNotificationCenter.
However, once I use launchd to start it as a LaunchDaemon I get no
receiving of notifications from either the daemon or the GUI app. Is
there a way to get
TN2083, Daemons and Agents?
http://developer.apple.com/technotes/tn2005/tn2083.html
Looking at the Supporting Fast User Switching section of the
Multiple User Environments guide, it seems to be implied that
NSDistributedNotificationCenter only works on GUI login sessions.
I'd look into configuring
On Jan 9, 2009, at 12:58 AM, Aaron Scott wrote:
I have a background process that when started manually talks
correctly with the GUI app using NSDistributedNotificationCenter.
However, once I use launchd to start it as a LaunchDaemon I get no
receiving of notifications from either
Cocoa Frameworks, Apple
On Oct 25, 2008, at 16:48, Jeff Johnson wrote:
I'm using NSDistributedNotificationCenter to deliver notifications
from a helper application to the main application. I followed the
instructions from http://developer.apple.com/technotes/tn2004/tn2124.html#SECFILES
, i.e
I'm using NSDistributedNotificationCenter to deliver notifications
from a helper application to the main application. I followed the
instructions from http://developer.apple.com/technotes/tn2004/tn2124.html#SECFILES
, i.e., sudo touch /var/log/do_dnserver_log and restart, but this
doesn't
Hi,
Has anyone had any luck using a NSDistributedNotificationCenter in a prefpane?
code:
in using the pref pane example from apple
(http://developer.apple.com/samplecode/PrefsPane/index.html), I used the
following code in the mainViewDidLoad method.
NSDistributedNotificationCenter *center
Hi,
has anyone been able to get a NSDistributedNotificationCenter (send/rec) to
work within a prefpane?
Randy
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list
27 matches
Mail list logo