discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow retains cycle


From: Nicola Pero
Subject: Re: NSWindow retains cycle
Date: Thu, 21 Feb 2002 23:55:04 +0000 (GMT)

> Can't speak for MacOS X yet, but on NEXTSTEP / OPENSTEP, the repeat key  
> events (and the final key-up, I suppose) go to the new view after the  
> mouse click. (The behaviour of NEXTSTEP and OPENSTEP-based apps is the  
> same.)

Thanks a lot - very useful - by the way your comment made me realize that,
because of the repeat key events, trying to send keyUp: to the original
responder would never actually work in practice - if you change first
responder without raising your key press, as soon as a key down is
generated, which will happen very soon because of the key repeats, that
key down will go to the new first responder, causing the key up to go to
the new first responder in all cases!

So the original responder code was basically useless (because in most
cases the keyUp: would go to the new first responder anyway!) - not to say
that it caused the library to perform a very complicated and difficult to
predict behaviour -, and I removed it.  We now send the keyUp: to whatever
view happens to be the first responder at the moment of the keyUp:.

Applications needing to wait for the keyUp: in the original view should be
careful enough to detect changes in first responder status, knowing that
such a change means they will never get the keyUp:.  They would have had
to do it anyway.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]