In a document window enter garbage into a text field and press return. An alert
panel will be presented as a sheet attached to the window. In the alert panel
the user can choose "Discard Change" or "OK".
So far so good.
In my case I have a text field subclass with a derived value custom binding.
The text field implements the NSErrorRecoveryAttempting informal protocol.
- (void)attemptRecoveryFromError:(NSError *)error
optionIndex:(NSUInteger)recoveryOptionIndex
delegate:(id)delegate
didRecoverSelector:(SEL)didRecoverSelector
contextInfo:(void *)contextInfo
{
// Discard Change
if (recoveryOptionIndex == 1) {
[self abortEditing]; // does not work
}
}
Sending the text field an abortEditing message does not work. How can changes
to the text field be discarded?
--Richard Charles
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]