• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSPopover tear-off problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSPopover tear-off problem
      • From: Keary Suska <email@hidden>
References: 
 >NSPopover tear-off problem (From: Graham Cox <email@hidden>)

  • Prev by Date: NSPopover tear-off problem
  • Next by Date: Re: Kerning Pairs
  • Previous by thread: NSPopover tear-off problem
  • Next by thread: Re: NSPopover tear-off problem
  • Index(es):
    • Date
    • Thread