On 24/02/2013, at 10:16 PM, Bill Cheeseman <b...@cheeseman.name> wrote:

> I assume that the change in window is the source of the problem with the date 
> picker's highlighting behavior after the popover is detached. But I don't 
> understand exactly what's happening, or what I can do about it.
> 


Well, I haven't tried this thing with detaching a popover window, but looking 
at the docs there are a few things that you haven't mentioned. For example, the 
docs take pains to point out not to attempt to move the content from the 
popover to the window, but instead to create a separate nib with the content 
for the detached window. (I think you could probably share a nib loaded by a 
NSViewController, but it would still be instantiated separately).

I assume you have followed this advice.

In that second nib, it doesn't seem as if there should be anything special 
about the arrangement of the window and its content, so it should behave just 
as if it were any other window loaded from a nib. That means if you have set 
initialFirstResponder to the date picker view in this second nib, it will 
become first responder (and hence highlight) when the window is shown. 
Alternatively, if you are loading the window content using a NSViewController, 
you might have to undertake setting the initial first responder yourself.

If you've done all that and it's still not working as expected, maybe there's a 
subtle bug in the code that animates between the popover and the new window. 
This being newish code, it's possible.

I have frequently found that Apple's own sample code isn't always as thorough 
as it could be, so just using sample code as boilerplate may not have 
considered all these issues; it might not be a bug but just something the 
sample code didn't bother with.

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to