Instance Method

control:didFailToFormatString:errorDescription:

Invoked when the formatter for the cell belonging to the specified control cannot convert a string to an underlying object.

Declaration

- (BOOL)control:(NSControl *)control didFailToFormatString:(NSString *)string errorDescription:(NSString *)error;

Parameters

control

The control whose cell could not convert the string.

string

The string that could not be converted.

error

A localized, user-presentable string that explains why the conversion failed.

Return Value

YES if the value in the string parameter should be accepted as is; otherwise, NO if the value in the parameter should be rejected.

Discussion

Your implementation of this method should evaluate the error or query the user an appropriate value indicating whether the string should be accepted or rejected.

See Also