-(BOOL)acceptsFirstResponder and -(BOOL)becomeFirstResponder 's return values are ignored
-(BOOL)acceptsFirstResponder and -(BOOL)becomeFirstResponder 's return values are ignored
- Subject: -(BOOL)acceptsFirstResponder and -(BOOL)becomeFirstResponder 's return values are ignored
- From: Nick <email@hidden>
- Date: Fri, 30 Sep 2011 16:43:35 +0300
Hello
I have an editable NSTextField subclass, which overrides these two methods
and returns NO there. I have placed an Edit Box (nstextfield) in Interface
Builder, whose class is set to this custom subclass with these two
overridden nsresponder methods.
when I run the application, I can still set focus on this edit box even
though the methods -(BOOL)acceptsFirstResponder and
-(BOOL)becomeFirstResponder get called (i checked that with NSLog). But,
despite me returning NO, i can click on this control with mouse and type
text in there.
This is an NSDocument based application.
What may be wrong?
Why does Cocoa ignore NO'es? Is there any higher-priority methods that I
need to override?
Interesting that in a "clean" application (i created one from scratch just
to see if this should work at all) it works - the user can't click on the
edit box. But not in this nsdocument based application.
Thanks
_______________________________________________
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