• 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: Random crash in -[NSView displayIfNeeded]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Random crash in -[NSView displayIfNeeded]


  • Subject: Re: Random crash in -[NSView displayIfNeeded]
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Fri, 22 Oct 2004 05:24:48 -0700

Hello...

What method are you using to remove the progress bar when you hide it?

<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSView.html#//apple_ref/doc/uid/20000014/removeFromSuperviewWithoutNeedingDisplay>

- (void)removeFromSuperviewWithoutNeedingDisplay

"Unlinks the receiver from its superview and its NSWindow, removes it from the responder chain, but does not invalidate its cursor rectangles to cause redrawing. The receiver is also released; if you plan to reuse it, be sure to retain it before sending this message and to release it as appropriate when adding it as a subview of another NSView.

Unlike its counterpart, removeFromSuperview, this method can be safely invoked during display."


Hope that helps,

Louis

More information about this. My code hides & shows a progress bar in the main window by adding or removing it to/from a view in the window. Since it can happen that insertion/removal happen several times a second, I suspect that at some point Cocoa gets 'lost' in thinking that an object that has been removed is still there. But that's still strange since my progress bar is retained by my code, so the object ptr is still valid.

Anyway, I'll try using a slower timer to hide/show the progress bar and see how that goes. I'm still taking hints at what could be the actual cause of the crash ;-)

Florent

_______________________________________________
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: 
 >Random crash in -[NSView displayIfNeeded] (From: Florent Pillet <email@hidden>)
 >Re: Random crash in -[NSView displayIfNeeded] (From: Florent Pillet <email@hidden>)

  • Prev by Date: Re: NSDocument updateChangeCount doesn't
  • Next by Date: RE: Re: textDidEndEditing[Solved]
  • Previous by thread: Re: Random crash in -[NSView displayIfNeeded]
  • Next by thread: Making my transition to bindings, how do I initilize my values & notifications?
  • Index(es):
    • Date
    • Thread