Skip navigation.
 
mlRe: event/notification for focus?
FROM : Shawn Erickson
DATE : Thu Apr 07 19:29:35 2005

On Apr 7, 2005, at 10:07 AM, Luc Vandal wrote:

> I just want to be able to run a function when the focus (or should I 
> use the term first responder? I'm confused) changes to another 
> control.


What will that function do is what we are trying to understand? What do 
you need to do that depends on which control is currently at the head 
of the responder chain.

It goes to division of responsibility in your application and that you 
may be trying to mix across the lines, paradigm if you will, that Cocoa 
(AppKit) outlines.

> Also, when the focus is changing to another control, does that mean 
> that the control that has the focus is now the first responder or the 
> first responder always remains the same?


The concept of focus [1] (aka a focused view) in Cocoa is separate from 
that of responders. The former deals with setting up the graphics 
environment as needed so a view can render itself when it is requested 
to do so. The later deals with responding to user input which of course 
could trigger the need for a view to redraw itself but that is an 
indirect relationship.

-Shawn

[1] 
<http://developer.apple.com/documentation/Cocoa/Conceptual/DrawViews/
Tasks/DisplayingViews.html#//apple_ref/doc/uid/20000914/102181
>

Related mailsAuthorDate
mlevent/notification for focus? Luc Vandal Apr 6, 20:57
mlRe: event/notification for focus? Ricky Sharp Apr 6, 21:58
mlRe: event/notification for focus? ttempel Apr 7, 00:48
mlRe: event/notification for focus? Luc Vandal Apr 7, 01:58
mlRe: event/notification for focus? Dustin Voss Apr 7, 02:22
mlRe: event/notification for focus? Mike Ferris Apr 7, 16:41
mlRe: event/notification for focus? Luc Vandal Apr 7, 17:50
mlRe: event/notification for focus? Ricky Sharp Apr 7, 17:58
mlRe: event/notification for focus? Luc Vandal Apr 7, 18:26
mlRe: event/notification for focus? j o a r Apr 7, 18:36
mlRe: event/notification for focus? Shawn Erickson Apr 7, 18:41
mlRe: event/notification for focus? Luc Vandal Apr 7, 18:46
mlRe: event/notification for focus? j o a r Apr 7, 18:51
mlRe: event/notification for focus? Luc Vandal Apr 7, 19:07
mlRe: event/notification for focus? Ricky Sharp Apr 7, 19:15
mlRe: event/notification for focus? Shawn Erickson Apr 7, 19:29
mlRe: event/notification for focus? Shawn Erickson Apr 7, 20:48
mlRe: event/notification for focus? Luc Vandal Apr 7, 22:02
mlRe: event/notification for focus? Luc Vandal Apr 8, 18:06
mlRe: event/notification for focus? Shawn Erickson Apr 8, 18:18
mlRe: event/notification for focus? Shawn Erickson Apr 8, 18:22
mlRe: event/notification for focus? Luc Vandal Apr 8, 18:29
mlRe: event/notification for focus? Shawn Erickson Apr 8, 18:43
mlRe: event/notification for focus? Luc Vandal Apr 8, 18:46
mlRe: event/notification for focus? Luc Vandal Apr 8, 19:17
mlRe: event/notification for focus? Shawn Erickson Apr 8, 19:33
mlRe: event/notification for focus? Luc Vandal Apr 8, 21:35
mlRe: event/notification for focus? Shawn Erickson Apr 8, 21:45