Re: nextKeyView order is ignored after loading into NSTabView
Re: nextKeyView order is ignored after loading into NSTabView
- Subject: Re: nextKeyView order is ignored after loading into NSTabView
- From: Steve Mills <email@hidden>
- Date: Tue, 03 Dec 2013 20:05:20 -0600
On Dec 3, 2013, at 16:08:23, Steve Mills <email@hidden> wrote:
> We have a window that has a tab view that contains 2 tabs. The 2 tabs contain empty views. The actual views are in their own specific xibs and get loaded manually, then we replace the temp views in the tabs with the actual views via:
>
> tab.view = realView;
>
> At that point, the key loop is being recalculated, even though the window has the autorecalculatesKeyViewLoop set to NO. This screws up our nextKeyView order. I've set a symbolic breakpoint on setNextKeyView, but it only stops twice, not once for all the fields that are in the real view. After setting the tab's view above, I walk the nextKeyView chain and see a totally different list. Where previously it contained only the editable NSTextFields that we specifically set to be nextKeyViews in the xib, it now contains *every* view in the xib, including non-editable NSTextFields that also have their refusesFirstResponder set to YES.
>
> Why is this happening and how can I prevent it?
Why is the window doing recalculateKeyViewLoop when autorecalculatesKeyViewLoop returns NO? It's like it's not even paying attention to it.
As a test, I grabbed the order of views before Cocoa goes and changes it to the wrong order, then restored that order after it messed it up. Yet tabbing *still* does in the wrong order. WTF is wrong with this stuff?
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden