Post by Scott Herz
I can reproduce this if I forget to make the NSTabView stretchy in the
vertical direction. However, it will work correctly if you allow it to
grow (inner springs). I'll right it up as a bug. Thanks.
Thanks for the tip. It promptly led to the next problem though, which is probably the same bug in a different guise:
Steps 1-4 are like the last time in InterfaceBuilder:
1. New Cocoa Empty
2. Drag in a NSWindow with an NSDrawer
3. Drag a NSButton into the NSWindow and connect it to open: of NSDrawer (for testing)
4. Open DrawContentView, drag in NSTabView set frame to DrawContentView frame (0.0, 0.0, 250, 300). Gotta do this manually, because IB won't let me (why ??)
5. (Implement suggestion) Make NSTabView stretchy in vertical
6. Select "Tab" NSTabViewItem (make sure with Inspector, that it is indeed selected), drag in a NSBox into selected tab. Make NSBox springy on bottom (not stretchy). Set to "no title" and "no border", resize with mouse to cover complete area.
7. Double click new box, drag some other elements in.
8. Test interface: same problem as before.
9. Make NSBox stretchy now. Mark elements dragged in at step 7 to bottom springy.
10. Test interface: different problem.
This means that I am still unable getting all the interface elements stick to the top. At the moment I am considering to give up on NSDrawers and go for normal windows instead, where everything seems to behave normally. Hopefully though, someone has another idea! (This little project was started, because I wanted to get familiar with NSDrawers...)
Here's some more bugs. I wanted to put them directly into bugtrack.apple.com but I am always getting (seems that 8 out of 10 of my tries to access this service, it's broken)
An error occurred while processing your request:
Main Error Number: 921
[INTERSOLV][ODBC Oracle driver][Oracle]ORA-00921: unexpected end of SQL command
Main Error Number: -101
General error during data source operation.
Anyway #1 is an IB bug. When you set the number of NSTabViewItems in a freshly dragged in NSTabView to 1 (from 2), the other NSTabViewItem isn't really removed as can be seen when using the outline view.
#2: when you drag a CustomView into the NIB directly (not into a window), the origin coordinates for display modes "bottom/(left-right)" are OK, but for "top/(left-right) they are messed up (random).
#3: drag in a custom view into the NIB directly. Put any interface element on that view. Now resize the window (that edits the CustomView) and notice the peculiar jitter on the top and right sides. That's no good.
#4 non-reproduceable, sometimes when I have a NSTabView in a CustomView and resize the window, the NSTabView jumps all over the place and then "snaps" back.