Re: NSPopover tear-off problem
Re: NSPopover tear-off problem
- Subject: Re: NSPopover tear-off problem
- From: Graham Cox <email@hidden>
- Date: Mon, 13 Oct 2014 15:02:54 +1100
On 13 Oct 2014, at 2:43 pm, Graham Cox <email@hidden> wrote:
> But if I turn the popover into a window by allowing it to be dragged, the window's content is screwed up - instead of sizing the overall view to fit the window, a subview (an NSTableView) is sized to fill the window, and some other views (a search field and a button) end up on top of the table. The button is in the right place, but the search field is too wide and extends beyond the window edge. Perhaps there is a problem with having a table view inside a popover? It seems to work fine, so I think that's unlikely. Perhaps the problem is with struts/springs being translated into constraints?
A further clue I've just doscovered: if I set the popover.animates = NO, the window is shown properly with its content in the right places. This suggests that the issue is with NSPopover's animation to the window. It seems to be trying (and failing) to be too clever, animating each subview's frame to its equivalent in the window.
However, since it has no possible information about which view in the two places are equivalent to each other, it must be using some sort of brain-dead method to figure out the associations. This is really stupid - either implement a method so that our code can give it the information or do not attempt such a thing. It seems it's deciding that my table "must be" the overall view and so sizes it to fit the window. Wrong! It wouldn't be quite so bad if I had the opportunity to fix it up but I don't.
--Graham
_______________________________________________
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