Skip navigation.
 
mlShift-tab in window not working correctly?
FROM : Duncan Champney
DATE : Tue Jan 22 21:38:20 2008

I have a window in my application with a number of input NSTextFields. 
The intialFirstResponder is set to the first text field, and 
nextKeyView for each field points to the next, and the last one points 
back to the first, as normal.

The form was created using the version of IB in XCode 2.x (2.4 I 
think), and I have since moved to XCode 3.0. I'm still building my app 
for OS 10.4. I'm not using any of the 10.5 extensions.

My program enables and disables some of the fields depending on the 
setting of other fields on the form. When it is initially displayed, 
the first field, "anchor value", is disabled. Cocoa automatically sets 
the intitialFirstResponder to the second field, just like I'd expect 
it to.

Tabbing forwards through the fields in my form works as expected. 
However, if I shift tab through the fields, it stops at my second 
field. It looks like the backwards link from that field to the 
previous field is getting broken somehow. I'm guessing that this has 
something to do with my app disabling the first field when the form is 
displayed initially.

Is there some housekeeping I need to do when I enable/disable editable 
text fields in order to keep the forward and backward links (each 
field's "nextKeyView) set up correctly?



Duncan Champney

Related mailsAuthorDate
mlShift-tab in window not working correctly? Duncan Champney Jan 22, 21:38
mlRe: Shift-tab in window not working correctly? Keary Suska Jan 23, 03:29