Added beep to TextFIeld.Invalid() on Mac OS X.

This commit is contained in:
Pietro Gagliardi 2014-08-24 15:27:58 -04:00
parent 811ec66d81
commit b2eb341fb7
2 changed files with 3 additions and 1 deletions

View File

@ -205,6 +205,9 @@ id textfieldOpenInvalidPopover(id textfield, char *reason)
// NSMaxYEdge is the bottom edge when looking (maximum edge in window coordinates)
[popover showRelativeToRect:NSZeroRect ofView:toNSView(textfield) preferredEdge:NSMaxYEdge];
// and beep
NSBeep();
return (id) popover;
}

View File

@ -49,7 +49,6 @@ func (t *textfield) OnChanged(f func()) {
func (t *textfield) Invalid(reason string) {
// TODO disable animations if reason is still valid
// TODO don't steal focus
// TODO beep
if t.invalid != nil {
C.textfieldCloseInvalidPopover(t.invalid)
t.invalid = nil