• 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: Debugging a drawRect call at wrong time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging a drawRect call at wrong time


  • Subject: Re: Debugging a drawRect call at wrong time
  • From: Mark Dawson <email@hidden>
  • Date: Wed, 16 Mar 2005 09:55:47 -0800

Well, I fixed it (accidentally). I noticed in the console log that I had not converted over a call to a new name ([x mxx], where mxx isn't implemented). Fixing that made everything start to work.

Your solution is worth looking into, also.  Thanks!

Mark
On Mar 16, 2005, at 9:18 AM, Nick Zitzmann wrote:


On Mar 16, 2005, at 9:56 AM, Mark Dawson wrote:

I have a problem with my drawRect of my main document's view (inside the NScroller) being called after my document is closed. The main result of this is a crash (because its trying to access an NSWindowController that has already been deallocated). The crash IS correct. The problem is why the drawRect is being called (it wasn't before I "improved" my code).

Actually, now that you put it this way, I did have this problem once before. I solved it by making the controller listen for an NSWindowDidCloseNotification, and then setting the scroll view's document view to nil inside the corresponding method.


Nick Zitzmann
<http://www.chronosnet.com/>

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


This email sent to email@hidden


_______________________________________________ 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
References: 
 >debugging a dealloc crash (From: Mark Dawson <email@hidden>)
 >Re: debugging a dealloc crash (From: Nick Zitzmann <email@hidden>)
 >Debugging a drawRect call at wrong time (From: Mark Dawson <email@hidden>)
 >Re: Debugging a drawRect call at wrong time (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Avoiding flicker when dropping in a view
  • Next by Date: Text view (in custom view) - moving ruler markers below zero?
  • Previous by thread: Re: Debugging a drawRect call at wrong time
  • Next by thread: Drag&Drop woes...
  • Index(es):
    • Date
    • Thread