I'm using NSDocument/NSWindowController with bindings in the NSWindowController subclass set up in Interface Builder. When I close the window, I get the message "An instance 0x306860 of class Problem is being deallocated while key value observers are still registered with it." I'd like to unregister the window with all of its key value observers, but I can't figure out how.

Does the window have access to a list of all its observers that I can use for unregistering? I thought the observationInfo method looked promising, but it returns a pointer to an opaque structure. I can see the contents of the structure in gdb, but I can't get at them in code.

Or do I have to make every observer an IBObject and call removeObserver:forKeyPath: for each one? If I do it that way, how do I know what to use for keyPath?

I'm sorry if I'm missing something obvious. I've done my best to find an answer with Google, but no luck.

-Steve
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to