Instance Method

control:didFailToValidatePartialString:errorDescription:

Invoked when the formatter for the cell belonging to control (or selected cell) rejects a partial string a user is typing into the cell.

Declaration

- (void)control:(NSControl *)control didFailToValidatePartialString:(NSString *)string errorDescription:(NSString *)error;

Parameters

control

The control whose cell rejected the string.

string

The string that includes the character that caused the rejection.

error

A localized, user-presentable string that explains why the string was rejected.

Discussion

You can implement this method to display a warning message or perform a similar action when the user enters improperly formatted text.

See Also

Validating a Control’s Value

- control:isValidObject:

Invoked when the insertion point leaves a cell belonging to the specified control, but before the value of the cell’s object is displayed.