RE: NSComboBox problem
RE: NSComboBox problem
- Subject: RE: NSComboBox problem
- From: "Jeff Schneiderman" <email@hidden>
- Date: Sun, 7 Sep 2003 16:41:21 +0300
- Thread-topic: NSComboBox problem
Thanks for the advice. I didn't try this particular solution. Unfortunately, it also didn't work.
The problem is that I don't even get the textDidEndEditing notification when the popup is open. Every action which would trigger the EndEditing event is first caught and handled in order to close the popup. So when the popup gets closed, it takes the selection and puts it in the edit control and thus erasing everything I just typed. Again, if I try removing the selection in the list, it clears the edit control too. I'm in a catch-22.
Any other ideas?
Jeff
>
-----Original Message-----
>
From: Bruno Gaufier [mailto:email@hidden]
>
Sent: Thu, September 04, 2003 8:57 PM
>
To: Cocoa Dev
>
Subject: Re: NSComboBox problem
>
>
>
Hi,
>
>
On Thursday, September 4, 2003, at 05:56 PM, Jeff Schneiderman wrote:
>
>
> How do I cause the popup to close when I start typing or cause my
>
> typed entry
>
> into the edit control to take precedence over the selected
>
value which
>
> is
>
> activated when I hit enter?
>
>
The NSComboBox will call methods of its delegate depending on what
>
append (You can also
>
use the notification center).
>
>
Try creating a method with this signature on your combo's delegate
>
- (void)textDidEndEditing:(NSNotification*)pNotif
>
>
In this case you can get the combo (text) content via
>
aString = [yourCombo stringValue];
>
just as you've already done. It should work (probably) because
>
the NSTextField's delegate method is called sooner.
>
>
--
>
Bruno Gaufier
>
----
>
email@hidden
>
email@hidden
>
>
http://perso.club-internet.fr/bgaufier/
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.