Re: NSPopover + Bindings + Validation = Weirdness
Re: NSPopover + Bindings + Validation = Weirdness
- Subject: Re: NSPopover + Bindings + Validation = Weirdness
- From: Jonathan Mitchell <email@hidden>
- Date: Mon, 26 May 2014 10:05:01 +0100
On 26 May 2014, at 01:04, Keary Suska <email@hidden> wrote:
> I am implementing an editing view in a popover, and discovered that validations messages will cause exceptions because AppKit is broken in that regard...anyway so I set "always use application modal alerts" and that seems to work although the API is beeping somewhere after the alert is dismissed and I can't seem to find out why. This only happens when tabbing out of the field. I have a "commit" button that calls commitEditing and the validation message appears and there is no beep when it is dismissed.
Have you tried overriding :
NSResponder - (void)presentError:(NSError *)error modalForWindow:(NSWindow *)aWindow delegate:(id)delegate didPresentSelector:(SEL)didPresentSelector contextInfo:(void *)contextInfo
You can access the NSWindow instance at popoverObject.contentViewController.view.window;.
It might be possible to work around the AppKit bug.
> I suspect that the tab key event is somehow not being handled and is passed up the responder chain to something that doesn't like it so beeps.
This seems likely.
You could try just handling this event yourself within the responder chain.
I find that using XSViewController improves the whole NSView + responder chain experience.
Jonathan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden