Is there a way in Cocoa to know if a NSTextField is dirty ? If it has been edited ?
I know there is the delegate method:
- (void)textDidChange:(NSNotification *)notification;
but I would like to know after the editing, when I’m closing the window if the NSTextField has been edited.
In delegate method –
textDidBeginEditingortextDidChangeyou can set a bool variable, and later you can check the value of that bool variable.