On Jul 25, 2008, at 6:50 PM, Michael Ash wrote:

On Fri, Jul 25, 2008 at 9:42 PM, Graham Cox <[EMAIL PROTECTED]> wrote:
Well, it's the usual approach. The content view is something that the window owns to act purely as the root of its view hierarchy - there's usually not much to be gained by fiddling with it or putting your own content there directly. For example, when you drag a custom view (or any view) into a window in Interface Builder, it's actually adding it as a subview of the
implied contentView, which you never see in IB.

In fact I would go so far as to say that if you ever use
-setContentView:, you are very probably doing it wrong. It is, for the
most part, not a very useful call, and you can accomplish the same
thing more naturally, easily, and flexibly by adding the view as a
subview to the content view instead.

Well, I would not go quite that far, although I agree with you
in principle for normal everyday stuff.    I have some applications
which create bare windows --- no borders, controls, resizers,
shadows, and so on.    The view that replaces the default window
content view does all the drawing.    I don't see any value in
having a content view whose only purpose in life is to act as
a container for my drawing view.

But I agree that these are unusual cases . . .

    Cheers,
        . . . . . . . .    Henry


===============================+============================
  Henry McGilton, Boulevardier |    Trilithon Software
   Objective-C/Java Composer   |     Seroia Research
-------------------------------+----------------------------
  mailto:[EMAIL PROTECTED]   |   http://www.trilithon.com
                               |
===============================+============================




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to