• 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: setNeedsDisplay oddity?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setNeedsDisplay oddity?


  • Subject: Re: setNeedsDisplay oddity?
  • From: "jeffrey.w.lynch" <email@hidden>
  • Date: Wed, 14 Dec 2005 20:34:37 -0500

When are you calling setNeedsDisplay:YES on the custom view? Before or after you removed the subview?

Wonder if that would help.

- j e f f



On Dec 10, 2005, at 3:55 PM, Timothy Reaves wrote:

Hello.

I just spent some time trouble shooting a problem I had with a custom NSView. This view allowed the user to add and remove sub- views. When sub-views were added, the view displayed correctly. When sub-views were removed, the view almost displayed correctly.

What would happen is that the sub-views were added to the custom view from bottom to top, with the sub-views moving up one position to make room for the new sub-view. When one was removed, it was removed from the bottom, and the sub-views would slide down. The top sub-view would slide down correctly, but a 'ghost' sub-view was left in the original location. It was the same sub-view, but the controls on it were non-interactive.

I was calling setNeedsDispaly:YES on the custom view. To worked great for adding sub-views to the custom view. But not for removing them. What I ended up doing was calling setNeedsDisplay:YES on the custom views superView.

So my question is, why is it that when the custom view's size increases, the superView sees this and knows that it must redraw itself also, but when the custom view is made smaller, the superView does not see that it needs to redraw itself?

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

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: 
 >setNeedsDisplay oddity? (From: Timothy Reaves <email@hidden>)

  • Prev by Date: Re: Universal Binary and/or Mac on Intel logo?
  • Next by Date: Converting paths with long names to paths with short names
  • Previous by thread: setNeedsDisplay oddity?
  • Next by thread: CoreData: The NSManagedObject with ID:... has been invalidated
  • Index(es):
    • Date
    • Thread