0

I have a class that contains several textfields. I need to know when one is done being edited and send the new information to one of my other objects.

This question seemed similar but in Objective C? The buttons should be visible when the user is done entering the value in the textfield Objective-j doesn't have the same functions.

Browsing the documentation I found several functions that seemed like they might be able to help such as, textDidEndEditing but didn't understand how to use it. There are several more that sound related and I don't know what to use.

Summary: when the textfield is done being edited I need to perform another function. Also there are multiple textfields so I need to know which one is edited.

Community
  • 1
  • 1
kmp3
  • 115
  • 1
  • 6

1 Answers1

2

controlTextDidEndEditing is the delegate method you should implement. Or you can just set the target/action of the textfield

Me1000
  • 1,760
  • 1
  • 12
  • 14
  • controlTextDidEndEditing is not a method of the CPTextField class, at least, its not in the documentation. – kmp3 Jun 13 '11 at 15:22
  • How would I use setAction? My syntax is still really weak in objective-j. My closest guess would be: [self setAction: setName:[self stringValue]]; I am sure this is wrong. – kmp3 Jun 13 '11 at 16:15
  • It is a delegate method, I dont know where the documentation is... if you use it, it will work. [textfield setAction:@selector(myMethod:)] – Me1000 Jun 14 '11 at 19:02