On Feb 23, 2009, at 11:01 AM, Patrick Mau wrote:


On 23.02.2009, at 16:50, Eric Gorr wrote:


I am not sure I understand this.

Are you are saying is that you looked for the NSTextView being used as the field editor for the NSTextField and then removed the NSTextView from it's superview?

I tried this:

id fieldEditor = [[aNotification userInfo] objectForKey:@"NSFieldEditor"];
[fieldEditor removeFromSuperview];

Unfortunately, it didn't work.

Yes. The superview of the fieldeditor is some clipping view (I forgot the class).

ah, ok. Makes more sense now.

In any case, the solution to my problem turned out to be not so bad. I simply did the following:

[[[self view] window] makeFirstResponder:[self view]];

Basically, told the window to make someone else the first responder. This seemed to work.

I do find it odd that I could not tell the field editor to resign as first responder.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to