End editing text field?

Hi everyone,

Can I somehow make my text to be done edited in an NSTextField ? I mean when you type text and press enter, then there’s a blue focus around your text (not the blue focus around the text field), when you pressed enter in ASS this all worked and it called the “on end editing theObject” handler. But can I now force it with ASOC without typing enter?

Here’s a picture to make it more clearly http://img524.imageshack.us/img524/3272/picture1je.png

Thanks in advance

If you want an action for end editing set up a …_(sender) handler then link the text field as though it’s a button in IB to the handler (control drag from text field to cube).

Thanks ! :lol:

I don’t need enter to be typed to end editing, I want to call it from somewhere else. Is that possible with what you’re saying?

Where exactly is somewhere else?

Try selectText_

Oh is that what he meant.

I’m just guessing…

Perhaps what he wants is:

on pressedEnter_(sender)
theTextField's selectAll_(sender)--I use this one anyway
--more code if you want
end pressedEnter_

Thanks !

I couldn’t get selectAll: to work… I don’t know why. But I just found out selectText: does seem to work…

Thanks everyone!

Oops sorry, that’s for text views.