Hi Markus.

Maybe you can become the delegate of the field editor instead then.

-Kenny


On Jun 23, 2008, at 11:41 PM, Markus Spoettl wrote:
Hi Kenny,

On Jun 23, 2008, at 9:39 PM, Kenny Leung wrote:
NSTextField is a single-line entry control, so it wants to end editing when you hit return. In order to be notified, you should wire up its target outlet to be your controller and wire up its action to be an action method in your controller. If you are not familiar with target-action, you should read about it in the dev docs:


Thanks for your suggestion. Unfortunately that doesn't work because I cannot differentiate between the multiple possibilities of what makes the action fire. The NSTextField action is sent not only for pressing enter but also when the control looses firstResponder status.

Sure, I could workaround this by checking if the text field is still firstResponder and then assume it was enter that caused the event.

However, I was hoping that there is a definitive way to actually know that RETURN has been pressed on the text field.

Regards
Markus
--
__________________________________________
Markus Spoettl


_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to