I just found a solution, but I don't like it. I added method -beforeRelease to my view controller where I send -unbind: to my array controller. I call this method from my window controller just before -release call. This helps. But looks ugly... Does somebody know better way?
On Thu, Jan 15, 2009 at 12:51 AM, Vitaly Ovchinnikov <vitaly.ovchinni...@gmail.com> wrote: > Hello all, > > I have a custom-loaded NIB file with NSView and NSArrayController. > Array controller is bound to file's owner (NSObject's derived class) > and use some keypath for contentArray. The problem is when I close a > window and main window controller tries to release this file's owner - > array controller still holds a reference to it and doesn't allow to do > that. > > So I have two questions: > 1. What is the correct way to catch "closing" of the view to unbound > array controller? > 2. Do I really need to catch something? Maybe there is a simpler solution? > > Any ideas? > Thank you. > _______________________________________________ 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 arch...@mail-archive.com