Hi all,

I have a very weird problem that causes me tearing my hair out. For the first time in my life something works beautifully well under GNUstep but not at all under MacOSX. And I have no idea why. I do

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(storeDidRevert:) name:SOInvalidatedAllObjectsInStoreNotification object:editingContext];

[[NSNotificationCenter defaultCenter] postNotificationName:SOInvalidatedAllObjectsInStoreNotification object:editingContext];

- (void)storeDidRevert:(NSNotification *)notification
{
   NSLog(@"storeDidRevert...");
}

This works initially, but when I trigger

[[NSNotificationCenter defaultCenter] postNotificationName:SOInvalidatedAllObjectsInStoreNotification object:editingContext];

again, storeDidRevert: is not called anymore (only under MacOSX). My first guess was there must be an removeObserver: statement anywhere, but there is none. And I use exactly the same code on GNUstep where my code works perfectly! :-(

Any idea how this can be tracked done efficiently (with gdb)? Under GNUstep I would raise an exception in removeObserver if notificationName is SOInvalidatedAllObjectsInStoreNotification but on MacOSX I cannot simply alter and recompile the code of NSNotificationCenter.

Hints are greatly appreciated!

Thanks,

  Andreas



_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to