• 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: Loading a nib window and making it key - Mystery solved
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading a nib window and making it key - Mystery solved


  • Subject: Re: Loading a nib window and making it key - Mystery solved
  • From: Peter Sichel <email@hidden>
  • Date: Fri, 12 Oct 2001 16:39:47 -0400

At 10:16 PM +0200 9/25/01, email@hidden wrote:
The same problem appends to me but... unfortunately I don't have the answer.

I work with cocoa-java and can't use makeKeyAndOrderFront properly. The window is shown but is not the key. I try with an outlet, without outlet and others solution but nothing works.

As some may recall, I was having trouble loading a nib window
and making it key. The window would load and display but fail
to become key. The value returned from [NSWindowController window]
was nil.

I found the problem. When you define a window in a separate nib
file, it is not enough to wire your WindowController instance
to the Window, you must wire the File's Owner instance
to the window (or at least the window outlet in the File's Owner).

The File's Owner is a proxy for the WindowController and must
be wired to the window. [I haven't found where this is
explained in "Learning Cocoa".]

Share and Enjoy,

- Peter

--


  • Prev by Date: Re: holding NSMutables in non-mutable instances
  • Next by Date: Using Flash (.swf) ?!
  • Previous by thread: ascertaining which window is on top
  • Next by thread: Using Flash (.swf) ?!
  • Index(es):
    • Date
    • Thread