Problem with NSTableView in NSSplitView
Problem with NSTableView in NSSplitView
- Subject: Problem with NSTableView in NSSplitView
- From: Martin Hewitson <email@hidden>
- Date: Mon, 23 Nov 2009 08:21:05 +0100
Dear list,
I'm having some trouble when I have an NSTableView in an NSSplitView. I have the table set in IB to resize with the view it's in (all struts clicked). The table does not fill the full view. I have additionally a button below the table. Both the table and the button are in the top view of the split view. The problem I have is that when the splitter is dragged to the top of the window so that the top view of the split view has zero height, then the splitter is dragged down again to reveal the top view, the table is not in its proper position; the column headers are missing, for example.
I'm not sure if this is a Cocoa bug or not, but here's a simple set of steps to reproduce what I'm seeing.
1) Create a new Cocoa project
2) Open the MainMenu nib in IB
3) Add a split view to the window
4) Size the split view to fill the window and select all its resize/anchor struts
5) Add a table to the top view of the split view with the top of the table hitting the top of the view
6) Select all resize/anchor struts of the table
7) Add a button below the table in the top view of the split view
8) Set the button's anchor structs to bottom only
Now build and run and play with the splitter. If the top view reaches a certain minimum size, then the table position is changed.
I guess I'm setting struts etc wrongly, but I can't figure out quit what I'm doing wrong. I've uploaded a test project to
http://web.me.com/martinhewitson/BOBsoft/Home/Entries/2009/11/23_Trouble_with_NSSplitview_and_NSTableView_files/SplitViewWithTable.zip
Any clues gratefully received.
Oh, forgot to mention, I'm using Xcode 3.2.1 on SL.
Best wishes,
Martin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: email@hidden
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
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