Re: NSWindow with a NSTableView redraws incorrectly with autolayout on 10.8
Re: NSWindow with a NSTableView redraws incorrectly with autolayout on 10.8
- Subject: Re: NSWindow with a NSTableView redraws incorrectly with autolayout on 10.8
- From: Fritz Anderson <email@hidden>
- Date: Sun, 05 Aug 2012 10:35:14 -0500
On 5 Aug 2012, at 4:09 AM, Marcus Karlsson <email@hidden> wrote:
> If I run the application the window displays with the toolbar at the top
> and the table view in the middle. I then click on the green title bar
> button twice in order to first maximize the window and then restore it
> to its original size. However the window does not restore correctly,
> it's much taller than what it used to be.
>
> I then ctrl-click on the toolbar and hide it. The toolbar disappears
> with the usual toolbar animation but then immediately reappears. The
> toolbar is visible but does no longer respond to events. If the window
> is resized the ghost toolbar is left in its original position and does
> not resize with the window.
I've verified this, and it's as simple to reproduce as you say: Mac app, non-document, drag a toolbar in, and a table view, resized to the content view. It seems to be determined by whether auto layout is active. If you turn it off, the window behaves as expected (though you have to reset the autoresizing on the table).
I don't see anything obvious in the constraints. The only ones I can find are superview-hugging by the scroll view, and hugging/compression on various views. None of them are exceptional. I don't see maximum widths that constrain the window, and of course there's no explanation for reinserting the toolbar and detaching its items from their actions.
Attaching the toolbar's delegate to the app delegate (even without implementing any of the methods — they're supposed to be optional anyway) relieved the disappear/reappear/zombie behavior, but not the resizing problem.
Removing the toolbar had no effect on the resizing problem. Setting delegate and dataSource on the table view had no effect. Passing the results of constraintsAffectingLayoutForOrientation: on the table view to visualizeConstraints: produced nothing that looked unusual to me, but my eye is untrained.
File a bug if it doesn't get cleared up on the list.
— F
--
Fritz Anderson -- Xcode 4 Unleashed: (Hint: Kindle) -- <http://x4u.manoverboard.org/>
_______________________________________________
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