• 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: Changing order of views dynamically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing order of views dynamically


  • Subject: Re: Changing order of views dynamically
  • From: Andy Lee <email@hidden>
  • Date: Tue, 20 Mar 2007 13:03:14 -0400

On Mar 20, 2007, at 12:36 PM, Michael Watson wrote:
What on Earth is not precise about:

"Note: For performance reasons, Cocoa does not enforce clipping among sibling views or guarantee correct invalidation and drawing behavior when sibling views overlap. If you want a view to be drawn in front of another view, you should make the front view a subview (or descendant) of the rear view."

That's perfectly precise. The problem is, so is this:

"addSubview:positioned:relativeTo:

Inserts a view among the receiver’s subviews so it’s displayed immediately above or
below another view."


When you read these two conflicting docs, how did you know which doc to believe?

There are things in IB and NSView that appear to be planning for future additions, but in the end, the documentation says not to overlap views.

In the end, the documentation also describes a method for doing exactly that. And not only is there a contradiction, the correct statement is in what I would call the fine print. I suspect very few people read the Concepts docs, or remember all the details, compared to people who scan a class's documentation for a method that does what they want.


I think you filed a bug that should not have been filed.

Have you noticed that most people seem to see the NSView documentation very easily, and only find out about the "don't overlap sibling views" documentation when they come to this list? Perhaps you have not been on this list long enough to notice that? Do you disagree that clarifying the documentation on addSubview:positioned:relativeTo: and related methods would reduce the confusion?


--Andy

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Changing order of views dynamically (From: Sergey Shapovalov <email@hidden>)
 >Re: Changing order of views dynamically (From: Michael Watson <email@hidden>)

  • Prev by Date: Re: DVD as desktop
  • Next by Date: How to detect main menu being opened
  • Previous by thread: Re: Changing order of views dynamically
  • Next by thread: Re: Changing order of views dynamically
  • Index(es):
    • Date
    • Thread