Re: Core Data Bindings: NSFaultingMutableSet...addObserver...notSupported

2009-12-31 Thread Brad Gibbs
Thanks for the pointers, Quincey. I tried a few of the things you suggested, but settled on the filter predicate. I added my view controller for the projects detail view as an observer to self.selections.account. Each time the selected account changes, I set the filter predicate to filter the

Re: Core Data Bindings: NSFaultingMutableSet...addObserver...notSupported

2009-12-30 Thread Quincey Morris
On Dec 30, 2009, at 10:12, Brad Gibbs wrote: > Account <--->>ProjectSite<--->>Project > > I'm trying to get the projects array controller to load all projects for the > selected Account (so, all Projects for all ProjectSites). > > I've got an NSTableView listing accounts on the left, and view c

Core Data Bindings: NSFaultingMutableSet...addObserver...notSupported

2009-12-30 Thread Brad Gibbs
Hi, I'm trying to bind through a keyPath, but I'm getting nothing but errors. The most common is: [<_NSFaultingMutableSet 0x200267fe0> addObserver:forKeyPath:options:context:] is not supported. Key path: projectCode I've read that bindings don't necessarily cause faults to fire, but I've got

Re: Does initWithCoder re-create observers made with addObserver?

2009-12-03 Thread Quincey Morris
On Dec 3, 2009, at 09:21, David Hirsch wrote: > I'm trying to track down a bug. The subject says it all: If I've created an > observer programatically, then saved both the observed and observer objects > with encodeObject:forKey:, will decodeObjectForKey recreate that observer for > me, or do

Does initWithCoder re-create observers made with addObserver?

2009-12-03 Thread David Hirsch
I'm trying to track down a bug. The subject says it all: If I've created an observer programatically, then saved both the observed and observer objects with encodeObject:forKey:, will decodeObjectForKey recreate that observer for me, or do I need to do it myself? __

Re: addObserver problem with protocols

2009-01-14 Thread Greg Parker
saying that my protocol does not implement it. This would have worked if i used the real object behind. What should i do ? Just add a method like addObserver in the protocol and in the real object make the method just invoke the [super addobserver]. Or is there a better way to solve it

Re: addObserver problem with protocols

2009-01-14 Thread Keary Suska
saying that my protocol does not implement it. This would have worked if i used the real object behind. What should i do ? Just add a method like addObserver in the protocol and in the real object make the method just invoke the [super addobserver]. Or is there a better way to solve it

addObserver problem with protocols

2009-01-14 Thread Mohan Parthasarathy
have worked if i used the real object behind. What should i do ? Just add a method like addObserver in the protocol and in the real object make the method just invoke the [super addobserver]. Or is there a better way to solve it ? thanks mohan ___ Cocoa

Re: another n00b question -- addObserver weirdness

2008-11-11 Thread Quincey Morris
On Nov 11, 2008, at 10:35, John Zorko wrote: 2008-11-11 10:05:51.538 Magnatune[1382:20b] *** Terminating app due to uncaught exception 'NSRangeException', reason: 'Cannot remove an observer for the key path "buffersEmpty" from because it is not registered as an observer.' The Magnatun

another n00b question -- addObserver weirdness

2008-11-11 Thread John Zorko
Hello, all ... I'm experiencing weird issues with addObserver / removeObserver. I log when I add observers, as well as when I try to remove them, but I sometimes (not always) get an exception when I remove an observer: 2008-11-11 10:05:49.939 Magnatune[1382:20b] creating and sta

Re: defaultCenter's addObserver

2008-10-08 Thread John Love
for - addObserver, I passed an observed object = non-nil to -removeObserver. It could also indicate any other type of memory management error. NSZobieEnabled is the general facility for troubleshooting that type of problem, but in this case you could probably do with simple code inspection

Re: defaultCenter's addObserver

2008-10-07 Thread j o a r
On Oct 7, 2008, at 12:03 PM, John Love wrote: 2008-10-07 14:36:14.149 Calculate Medical[265:10b] *** -[NSCFSet calcStatusChanged:]: unrecognized selector sent to instance 0xe41f250 John, This type of error message indicates that your notification observer has been deallocated. This would

Re: defaultCenter's addObserver

2008-10-07 Thread j o a r
On Oct 7, 2008, at 8:26 AM, John Love wrote: So just for whatever, I pass object:nil to addObserver:selector:name:object:. Then, within my selector I test for the type of passed encapsulated object and something(?) doesn't work. My selector gets called for my first new MyDocument. But when

defaultCenter's addObserver

2008-10-07 Thread John Love
From MyDocument's windowControllerDidLoadNib I call a method in MyController, which in turn calls: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(aSelector:) name:aName object:anotherControllerObject]; The docs state that this passed object is the object that is

Re: addObserver:

2008-08-11 Thread Keary Suska
8/11/08 8:15 AM, also sprach [EMAIL PROTECTED]: > I'm making the following call (and defining observeValueForKeyPath on self > etc) on an NSArrayController, hoping to get notifications of it changing. But > I don't seem to be getting any notifications. Should this work? > > > [arrayController ad

Re: addObserver:

2008-08-11 Thread Negm-Awad Amin
Am Mo,11.08.2008 um 16:15 schrieb Chris Idou: I'm making the following call (and defining observeValueForKeyPath on self etc) on an NSArrayController, hoping to get notifications of it changing. But I don't seem to be getting any notifications. Should this work? [arrayController addOb

addObserver:

2008-08-11 Thread Chris Idou
I'm making the following call (and defining observeValueForKeyPath on self etc) on an NSArrayController, hoping to get notifications of it changing. But I don't seem to be getting any notifications. Should this work? [arrayController addObserver:self forKeyPath:@"content" o

Re: Where's the best place for addObserver and removeObserver

2008-07-17 Thread Joan Lluch (casa)
El 17/07/2008, a las 18:13, Jonathan Dann escribió: Hi Joan, As Keary says, removing in -dealloc is probably not the best thing to do as there are a few cases that this can bite you, like if your window controller retains the view controllers, and -dealloc is called on the window control

Re: Where's the best place for addObserver and removeObserver

2008-07-17 Thread Jonathan Dann
Hi Joan, As Keary says, removing in -dealloc is probably not the best thing to do as there are a few cases that this can bite you, like if your window controller retains the view controllers, and -dealloc is called on the window controller, which would proceed to release its collection of

Re: Where's the best place for addObserver and removeObserver

2008-07-17 Thread Keary Suska
7/17/08 8:59 AM, also sprach [EMAIL PROTECTED]: > However, the way I am doing it makes me wonder where the best place > should be for adding and removing the observers. What I am currently > doing is adding the observers in the awakeFromNib methods of each > viewController, and removing them in th

Where's the best place for addObserver and removeObserver

2008-07-17 Thread Joan Lluch (casa)
I am coding a single window, multiview, app, and as what I think is a recommended design pattern I only load the views controllers (and therefore their views) from their nibs as they are required, and then I retain them in the main window controller so they do not have to be loaded again ea