Re: Stop edit session with a NSTextField
Re: Stop edit session with a NSTextField
- Subject: Re: Stop edit session with a NSTextField
- From: Patrick Mau <email@hidden>
- Date: Mon, 23 Feb 2009 17:01:45 +0100
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).
Unfortunately, after starting to edit the view hierarchy looks
something like this:
NSTextCellView
NSxxxClipView
...
fieldeditor
So in my loop I create an NSLog line for each view "above" the
fieldeditor until I figured
what my control view was.
Warning! The ugly sample code hacked for my test is here:
http://oscar.homelinux.net/MultiCellView.zip
Please don't complain ;)
Patrick
_______________________________________________
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