Hi all,

I have a NSPopover which I allow to be dragged off to a floating window.

I'm following the code example in the 'NSPopover' sample fairly closely - I 
have a separate view controller instance for the window and the popover's 
content, each loading from the same secondary nib. None of my nibs are using 
autolayout - they are all using the old struts and springs model, but I am 
compiling with the 10.9 SDK using Xcode 6, and running on 10.9. The controllers 
and window are objects in the MainMenu.xib nib, and are handled by the app 
delegate. The popover is created in code, as per the popover sample project.

If I show the window immediately at launch, all is well - the view from the 
secondary nib is loaded into it and it is sized correctly and works fine.

If I show the popover, all is fine, it also has the correct content correctly 
positioned.

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?

I've been over and over the nib files and all their connections and everything 
looks fine - the secondary nib has File's Owner's 'view' outlet set to the 
correct overall view, and in isolation the window and popover each work 
correctly. It's only the case where the window is created by dragging the 
popover that screws up. I can't think why - I don't believe the NSPopover 
attempts to do anything with the window content - it just accepts what it's 
given by its delegate. So I am at a loss to explain this odd behaviour.

Anyone seen this?

--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