• 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: NSTextField Tab Order.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField Tab Order.


  • Subject: Re: NSTextField Tab Order.
  • From: Ken Thomases <email@hidden>
  • Date: Wed, 13 Jun 2012 04:47:37 -0500

On Jun 13, 2012, at 3:40 AM, Robert Tillyard wrote:

> mind you despite window being hooked up in IB window == NULL

You need to figure this out first.  It's indicative of a deeper problem.

Are you referring to the window property of a custom subclass of NSWindowController?  Is this window controller being instantiated in code?  If so, what initializer is called?  How is that initializer implemented?  In particular, I'm looking to make sure that -initWithWindowNibName: was called, or, if -initWithWindowNibName:owner: was called instead that the window controller passed itself as the owner (making use of that method redundant).

In the NIB, did you set the class of File's Owner to be your window controller class?  Was it File's Owner's window outlet that you hooked up?  A common mistake is to actually instantiate the window controller in the NIB and therefore have two window controllers.  That won't work right, obviously.

At what point did you attempt to use the window outlet?  If it was before -awakeFromNib or -windowDidLoad, it would be too early.  A common mistake is to attempt to reference the window during the initializer.


> I've tried hooking up the nextKeyView in IB but that doesn't help. I've also used [window setAutorecalculatesKeyViewLoop:NO]; in windowDidLoad (and in IB it's un-ticked) which doesn't help either

Did you set the initialFirstResponder outlet of the window to point to the first key view in your loop?  According to the docs for -[NSWindow recalculateKeyViewLoop], it is called "when [the window] is first loaded, ... automatically if your window does not have a key view loop already established".  I suspect that means if initialFirstResponder is not set.  So, I suspect that failing to set that means that the method will blow away your configuration of nextKeyView connections.

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSTextField Tab Order.
      • From: Robert Tillyard <email@hidden>
References: 
 >NSTextField Tab Order. (From: Robert Tillyard <email@hidden>)

  • Prev by Date: Re: NSSavePanel default file type
  • Next by Date: OS constant cause "32-bit RIP relative reference out of range" linker error on x64
  • Previous by thread: NSTextField Tab Order.
  • Next by thread: Re: NSTextField Tab Order.
  • Index(es):
    • Date
    • Thread