Discussion:
NSTabView in NSDrawer behaves strangely
(too old to reply)
Nat!
2001-01-05 22:59:37 UTC
Permalink
This are the steps I am taking:

In InterfaceBuilder I create a new Cocoa "Empty" file. I drag in a window with a drawer, and now I have a window, a drawer and a ContentView. I add a button to the window and connect it with the drawer open: method for testing.
Now I drag a NSTabView into the ContentView of NSDrawer. I do a "test interface" and everything looks fine, except that the NSTabView is anchored at the bottom of the drawer (resize the window to notice that effect), which is normal but ugly.

So now I select the NSTabView and adjust the resize behavior of the bottom to "springy". The NSTabView should now be anchored to the top. But when I test the interface, half the NSTabView is gone! Very peculiar.
Substituting a NSTextField for the NSTabView on the other hand everything works as expected.

I suspect this is a bug, but does anyone know of a work around ? I am stuck at the moment.

It's also peculiar that I can not resize my NSTabView to the size of the ContentView.

Thanks for any suggestions in advance
Nat!


P.S. This time I did check the archive. Hope I didn't miss anything relevant :)
Scott Herz
2001-01-05 23:18:53 UTC
Permalink
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.

Scott.
Post by Nat!
In InterfaceBuilder I create a new Cocoa "Empty" file. I drag in a
window with a drawer, and now I have a window, a drawer and a
ContentView. I add a button to the window and connect it with the
drawer open: method for testing.
Now I drag a NSTabView into the ContentView of NSDrawer. I do a "test
interface" and everything looks fine, except that the NSTabView is
anchored at the bottom of the drawer (resize the window to notice that
effect), which is normal but ugly.
So now I select the NSTabView and adjust the resize behavior of the
bottom to "springy". The NSTabView should now be anchored to the top.
But when I test the interface, half the NSTabView is gone! Very
peculiar.
Substituting a NSTextField for the NSTabView on the other hand
everything works as expected.
I suspect this is a bug, but does anyone know of a work around ? I am
stuck at the moment.
It's also peculiar that I can not resize my NSTabView to the size of
the ContentView.
Thanks for any suggestions in advance
Nat!
P.S. This time I did check the archive. Hope I didn't miss anything
relevant :)
_______________________________________________
MacOSX-dev mailing list
http://www.omnigroup.com/mailman/listinfo/macosx-dev
Scott Herz
2001-01-05 23:33:48 UTC
Permalink
Err, write it up...

"It's a homonym" - Dr. Evil
Scott.
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.
Scott.
Nat!
2001-01-06 19:35:43 UTC
Permalink
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.
Scott.
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...)


Nat!

P.S.:

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)

Error

An error occurred while processing your request:

Position: ValidateDSPerson
Class: DBMS
Main Error Number: 921

[INTERSOLV][ODBC Oracle driver][Oracle]ORA-00921: unexpected end of SQL command
S1000

Position: ValidateDSPerson
Class: Internal
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.
Giles Williams
2001-01-06 20:44:11 UTC
Permalink
On Friday, January 5, 2001, at 08:37 PM, Nat! wrote:
<snip lots about misaligned stuff in IB test view>
Post by Nat!
8. Test interface: same problem as before.
Errr - I think I had similar problems because my app was automagically saving its (named) window positions and the elements were aligned to the old, saved position and not the position I was using in IB. If this is what's happening to you then you should trash ~/Library/Preferences/yourApp.plist and try testing again.

This would appear to be a sort-of-bug in IB (or at least a feature that should be warned about).

Or maybe it's just me,
Giles.
--
Giles Williams

...call it evolution in action...
Giles Williams
2001-01-06 20:44:51 UTC
Permalink
On Friday, January 5, 2001, at 08:37 PM, Nat! wrote:
<snip lots about misaligned stuff in IB test view>
Post by Nat!
8. Test interface: same problem as before.
Errr - I think I had similar problems because my app was automagically saving its (named) window positions and the elements were aligned to the old, saved position and not the position I was using in IB. If this is what's happening to you then you should trash ~/Library/Preferences/yourApp.plist and try testing again.

This would appear to be a sort-of-bug in IB (or at least a feature that should be warned about).

Or maybe it's just me,
Giles.
Giles Williams
2001-01-06 20:45:42 UTC
Permalink
On Friday, January 5, 2001, at 08:37 PM, Nat! wrote:
<snip lots about misaligned stuff in IB test view>
Post by Nat!
8. Test interface: same problem as before.
Errr - I think I had similar problems because my app was automagically saving its (named) window positions and the elements were aligned to the old, saved position and not the position I was using in IB. If this is what's happening to you then you should trash ~/Library/Preferences/yourApp.plist and try testing again.

This would appear to be a bug in IB
Nat!
2001-01-06 22:45:54 UTC
Permalink
Post by Giles Williams
<snip lots about misaligned stuff in IB test view>
Post by Nat!
8. Test interface: same problem as before.
Errr - I think I had similar problems because my app was automagically saving its (named)
window positions and the elements were aligned to the old, saved position and not the
position I was using in IB. If this is what's happening to you then you should trash
~/Library/Preferences/yourApp.plist and try testing again.
This would appear to be a sort-of-bug in IB (or at least a feature that should be warned
about).
Thanks for the input, though I don't believe that this is the cause of the problem. I can reproduce the behaviour with a brand new window, having actually never left InterfaceBuilder.

Nat!

Loading...