becomeFirstResponder override issue
becomeFirstResponder override issue
- Subject: becomeFirstResponder override issue
- From: Chris Anderson <email@hidden>
- Date: Sun, 01 Feb 2009 21:32:11 -0800
Hello!
I've created a subclass of NSDatePicker to catch when a date picker
has focus. I have overridden the becomeFirstResponder method and
indeed it detects when it has focus. The code inside the method does
work except for any IBOutlets that I may have connected. They don't
respond to any requests.
I have verified that the IBOutlets are connected by adding a separate
IBAction in the subclass and a simple button to invoke the action.
Inside the IBAction I can call the same IBOutlets successfully.
I am baffled as to why when the IBOutlets are inside
becomeFirstResponder they don't seem connected. Example below...
-(BOOL)becomeFirstResponder // myArrayController will not respond
{ NSLog(@"DetectDatePicker:firstResponder: %i", [[myArrayController
arrangedObjects] count]);
return YES;
}
-(IBAction)detectPicker:(id)sender // myArrayController successfully
responds
{ NSLog(@"DetectDatePicker:performClick: %i",[[myArrayController
arrangedObjects] count]);
}
Any help would be appreciated. Thanks!
Chris
_______________________________________________
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