• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [CoreData] Undo of insert - how to close the removed object's window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [CoreData] Undo of insert - how to close the removed object's window?


  • Subject: Re: [CoreData] Undo of insert - how to close the removed object's window?
  • From: mmalcolm crawford <email@hidden>
  • Date: Tue, 15 Nov 2005 07:38:01 -0800


On Nov 15, 2005, at 1:43 AM, Kaspar Fischer wrote:

  I implemented this by observing the "books" attribute
of my "project" entity: whenever the "books" set changes,
I observe this and step through all windows, closing the
ones that have been removed.
  This has one problem: although I remove the window,
it and its subviews are not immediately released (I guess
they are only autoreleased and will be deallocated at
the end of the event loop). As a conequence, my subviews
-dealloc methods are not called, and as these unbind
several bindings, I end up with a closed window that
still has active bindings in some subviews.
  The result is that CoreData sends change notifications
to the controllers of these bindings -- and this of course
results in a crash because the bindings are still here,
but the book has already been removed!

I would first suspect that you're leaking the nib files -- see "Memory Management and Retain Cycles" at <http://homepage.mac.com/ mmalc/CocoaExamples/controllers.html>.


If you adopt the fix to that, then I would *guess* that either that should fix the problem directly, or you can use the approach to unbind the object controller prior to the window closing.

mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [CoreData] Undo of insert - how to close the removed object's window?
      • From: Kaspar Fischer <email@hidden>
References: 
 >[CoreData] Undo of insert - how to close the removed object's window? (From: Kaspar Fischer <email@hidden>)

  • Prev by Date: Re: xcode 2.2 coredata accessors
  • Next by Date: Re: Add a framework
  • Previous by thread: [CoreData] Undo of insert - how to close the removed object's window?
  • Next by thread: Re: [CoreData] Undo of insert - how to close the removed object's window?
  • Index(es):
    • Date
    • Thread