Re: Problem with NSDatePicker in popover
Re: Problem with NSDatePicker in popover
- Subject: Re: Problem with NSDatePicker in popover
- From: "William J. Cheeseman" <email@hidden>
- Date: Sat, 23 Feb 2013 15:32:09 -0500
On Feb 23, 2013, at 2:46 PM, "William J. Cheeseman" <email@hidden> wrote:
> I just discovered that Apple's Popover sample code exhibits exactly the same problem when I add a date picker to its popover view! The date picker looks and works as it should when the popover is anchored to its parent window, but it does not highlight its selected date picker elements after the popover is dragged out to its own detached window.
>
> This strongly suggests that there is a bug in NSDatePicker.
Using Apple's Popover example with a date picker added to its popover view, I made MyWindowController the delegate of the popover view and implemented the -windowDidBecomeKey: delegate method. In it, I test whether the window that is becoming key is the detached popover window, and if it is I call sleep(1). Then, when I run the application and detach the popover to its own window, the first date picker element is properly highlighted for one second. Then the highlighting disappears and at the same moment the original parent window loses its key window appearance.
So, it's something about the window connection that's causing the misbehavior, but I can't seem to put my finger on it conceptually.
--
Bill Cheeseman - email@hidden
_______________________________________________
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