• 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: Unclear on NSView's isOpaque concept (and optimization in general)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unclear on NSView's isOpaque concept (and optimization in general)


  • Subject: Re: Unclear on NSView's isOpaque concept (and optimization in general)
  • From: Alastair Houghton <email@hidden>
  • Date: Thu, 6 Nov 2003 16:12:33 +0000

On 6 Nov 2003, at 15:11, Leon McNeill wrote:

On 6 Nov 2003, at 12:45, Alastair Houghton wrote:
The order in which sibling views are rendered isn't defined and may even change during a single run of your program due to optimisations in the frameworks. So if you overlap them, you may find that they don't always display correctly. Using overlapping sibling views won't degrade the performance of your app., but it might make it misbehave.

And on 6 Nov 2003, at 13:05, Clark Cox wrote:
The order in which sibling views are drawn is completely undefined. You have no way of knowing which of two overlapping views will be drawn first, and which will be drawn second.

Far from undefined, indeed, I have found nothing in either documentation nor in real world testing which implies or indicates that my NSView subclasses will *ever* draw in any order other than the order in which they were added to their superview (or inserted via addSubview:positioned:relativeTo:).

Cocoa Programming (Anguish, Buck & Yacktman), p. 200:

"The order in which views with the same superview are drawn is not defined."

Plus the following threads from this list:

http://cocoa.mamasam.com/COCOADEV/2002/10/2/48305.php
http://cocoa.mamasam.com/COCOADEV/2001/06/1/4750.php
http://cocoa.mamasam.com/COCOADEV/2001/10/2/15717.php
http://cocoa.mamasam.com/COCOADEV/2001/11/2/18827.php
http://cocoa.mamasam.com/COCOADEV/2001/09/1/12120.php

(and doubtless hundreds more).

Most of these comments were probably made some time ago, so it *is* possible that things have been fixed so that the views aren't actually drawn in reverse order, but even then, it won't work for views that dynamically update (as Stephane pointed-out).

I can't find any mention of this in the documentation either, but then there is a lot of documentation and perhaps I've picked the wrong search terms.

Kind regards,

Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Unclear on NSView's isOpaque concept (and optimization in general) (From: lbland <email@hidden>)
 >Re: Unclear on NSView's isOpaque concept (and optimization in general) (From: Leon McNeill <email@hidden>)

  • Prev by Date: Alternate row coloring
  • Next by Date: Re: crash when getting AppleScript dictionary
  • Previous by thread: Re: Unclear on NSView's isOpaque concept (and optimization in general)
  • Next by thread: Modifying the array of an NSArrayController
  • Index(es):
    • Date
    • Thread