Re: Core Data Binded Text Fields
Re: Core Data Binded Text Fields
- Subject: Re: Core Data Binded Text Fields
- From: Jason Ketterman <email@hidden>
- Date: Fri, 16 Nov 2007 02:56:22 -0600
I'm new to debugging, I think I set this up correctly, but may have
failed. Here is the backtrace without any calls to makeFirstResponder
and without the Window's initialFirstResponder set. (This
configuration correctly focuses on the first NSTextField unless it has
a binding.)
http://nflux.net/lcb/backtrace.png
I'm not sure what NSWindow uses to select the first key view, but it
won't pick any controls with Core Data bindings attached to them. If I
set the Window's initialFirstResponder, makeFirstResponder does not
get called when the window loads, and it still does not focus on the
field I selected as the initialFirstResponder.
I'm thinking this is an AppKit bug, and I'm going to file a bug report
unless someone can just tell me how stupid I am.
Thanks,
Jason
On Nov 15, 2007, at 10:04 AM, Uli Kusterer wrote:
Am 15.11.2007 um 15:48 schrieb Jason Ketterman:
For some reason, that doesn't end up working. The only way I can
get the first text field to be the first responder is to do a
performSelector... afterDelay. I know that has to be some horrible
work-around. I'm calling the code from inside of windowDidLoad, I
don't know if that makes a difference.
That probably means that someone else is changing the focus after
windowDidLoad. So, your setting succeeds, but is undone by whoever
else does that. Do you have any other code (accessors?) that changes
the keyboard focus? Have you tried setting a breakpoint in the
debugger on [NSView makeFirstResponder] or whatever that logs a
backtrace and then continues? That might tell you who, apart from
you, is calling this.
Cheers,
-- M. Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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