Re: Calling commitEditing text field loses focus

Christiaan Hofman <[email protected]> Wed, 21 Dec 2011 01:09:38 +0100
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Dec 21, 2011, at 0:49, Kyle Sluder wrote:

> On Tue, Dec 20, 2011 at 1:41 PM, Christiaan Hofman =
<[email protected]> wrote:
>>=20
>> On Dec 20, 2011, at 21:50, Kyle Sluder wrote:
>>=20
>>> Try using -commitEditingAndReturnError: (new in 10.7) instead?
>>>=20
>>> --Kyle Sluder
>>=20
>> Not relevant, I support 10.5. Moreover, why would or should returning =
an error change this behavior?
>=20
> It's not "returning an error" that would change the behavior. That
> method was added to support autosaving in Lion, which you probably
> wouldn't want to disturb the responder chain at random times even if
> it was successful. Now that that method exists, it could be possible
> that the behavior of NSTextField's -commitEditing was changed to give
> up first responder. That's why I suggested you try it.
>=20
> --Kyle Sluder

The fact that you may want this for autosaving does not mean you may not =
want this for other commits. So this would be no explanation. Moreover, =
it now also behaves this way in 10.6.8 where the new method is not =
available. I see no reason why generically committing should stop an =
edit.

Christiaan