• 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: Collection of Cocoa & objc questions from a "newbie"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Collection of Cocoa & objc questions from a "newbie"


  • Subject: Re: Collection of Cocoa & objc questions from a "newbie"
  • From: "John C. Randolph" <email@hidden>
  • Date: Wed, 18 Jul 2001 02:53:51 -0700

On Wednesday, July 18, 2001, at 02:43 AM, Art Isbell wrote:

On Tuesday, July 17, 2001, at 11:31 PM, John C. Randolph wrote:

On Wednesday, July 18, 2001, at 02:12 AM, Art Isbell wrote:

An example of one of these template classes is NSWindowTemplate.

Are you sure about this? I thought that NSWindowTemplate was only used within IB, and that it actually instantiated an NSWindow and wrote *that* into the .nib. IIRC, NSWindowTemplate provides the IB-specific window behavior like accepting dragged objects from the palettes and drawing the blue, dashed layout lines.

It's easy to check for yourself. Just load a Cocoa app into gdb, set breakpoints at NSWindowTemplate's initWithCoder: and NSWindow's initWithCoder: and initWithContentRect:styleMask:backing:defer:, and run it. When the main window is loaded, execution should break first at NSWindowTemplate's initWithCoder:, then at NSWindow's initWithContentRect:styleMask:backing:defer:, but never at NSWindow's initWithCoder:.

Let's see then... Doesn't that make [NSWindow initWithCoder:] a noOp? If it's not called when taking a window out of a nib, then when would it ever get used?

I guess somebody might do something pathological like pass a window bycopy over a DO connection, but I've never seen it done..

-jcr


"The right to be heard does not include the right to be taken seriously." - Hubert Humphrey


  • Follow-Ups:
    • Re: Collection of Cocoa & objc questions from a "newbie"
      • From: Art Isbell <email@hidden>
References: 
 >Re: Collection of Cocoa & objc questions from a "newbie" (From: Art Isbell <email@hidden>)

  • Prev by Date: Re: Collection of Cocoa & objc questions from a "newbie"
  • Next by Date: Re: Creating shared classes
  • Previous by thread: Re: Collection of Cocoa & objc questions from a "newbie"
  • Next by thread: Re: Collection of Cocoa & objc questions from a "newbie"
  • Index(es):
    • Date
    • Thread