Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 23, 2008, 11:19 AM   #1
phjo
macrumors regular
 
Join Date: Jan 2008
Display bug with the header on a NSOutlineView

At least it looks like a bug...

I have put a NSOutlineView in my window, which is embedded in a NSScrollView, with one column.

The data is displaying fine, with collapsible parts etc, but I have this strange problem with the header as soon as I scroll horizontally the outline view column : the header is shifted some 10 or 15 pixels to the left, and the title is then missing a few chars... Things go back to normal when I make the window large enough to get rid of the horizontal scroller...

That's quite ugly, and the problem seems quite the same as the one discussed in this mailing list : http://lists.apple.com/archives/Coco.../msg00803.html except that my window is simpler as I do not have two scrollviews embedded in each other, just one containing the NSOutlineView...

Here is the normal header :


And the header such as it appears after expanding one item and playing with scroller (to the right and back to the left) :



Has anyone seen this ? and is there a fix for it ?

phjo

P.S. : it looks like there is a display bug in the items as well, as when the bug appears, if I collapse every item from the root, then the header goes back to normal, but the items are shifted to the right somewhat... (and move again to the left as soon as I expand one of the items...)

P.P.S : I am using XCode+IB 3
phjo is offline   0 Reply With Quote
Old Mar 23, 2008, 11:23 AM   #2
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Try in a new window in a different file to check its not just a weird corruption with that nib file.

Also are you currently using any code to control the UI or are you just using Interface Builder?
__________________
If they have to tell you every day they are fair you can bet they arent, if they tell you they are balanced then you should know they are not - Don't Hurt me
Eraserhead is offline   0 Reply With Quote
Old Mar 23, 2008, 11:50 AM   #3
phjo
Thread Starter
macrumors regular
 
Join Date: Jan 2008
Quote:
Originally Posted by Eraserhead View Post
Try in a new window in a different file to check its not just a weird corruption with that nib file.
I'm not sure how I can do that... redoing the nib from scratch, only keeping the code ?

Well, I might try it, but I don't suppose it will change a thing, and if it did, it would be even worse and weirder to think that the bug is in interface builder rather than in NSOutlineView (or in my understanding of it, of course...)

Quote:
Also are you currently using any code to control the UI or are you just using Interface Builder?
There is of course some code, but right now there is not much more than the data initialization and datasource methods (for one NSTableView and one NSOutlineView side by side)... (No bindings.)

phjo
phjo is offline   0 Reply With Quote
Old Mar 23, 2008, 11:52 AM   #4
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Quote:
Originally Posted by phjo View Post
I'm not sure how I can do that... redoing the nib from scratch,
Well just to include the troublesome elements yes, not the whole thing. Just to see if its repeatable. i.e. a bug or just a file corruption.

Quote:
Originally Posted by phjo View Post
There is of course some code, but right now there is not much more than the data initialization and datasource methods (for one NSTableView and one NSOutlineView side by side)... (No bindings.)

phjo
That shouldn't cause a problem like this.
__________________
If they have to tell you every day they are fair you can bet they arent, if they tell you they are balanced then you should know they are not - Don't Hurt me
Eraserhead is offline   0 Reply With Quote
Old Mar 23, 2008, 12:29 PM   #5
phjo
Thread Starter
macrumors regular
 
Join Date: Jan 2008
Well, it looks like you're just right, Eraserhead, as by redoing the window nib in a different project, I can't reproduce the display bug it seems...

It raises some stability issues with interface builder though if one has to cope with such random and weird behaviour at times...

phjo
phjo is offline   0 Reply With Quote
Old Mar 23, 2008, 02:50 PM   #6
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
I've had weird issues like this before where controls just go funky on you. Rebuilding the control in the NIB has fixed it every time for me.
kainjow is offline   0 Reply With Quote
Old Mar 23, 2008, 03:42 PM   #7
phjo
Thread Starter
macrumors regular
 
Join Date: Jan 2008
Yes, removing and adding back the NSOutlineView has fixed it in my original project... Better than to redesign the window from scratch obviously...

I'll need quite a bit of time to get used to interface builder though... I had some trouble obtaining a button resting under the NSOutlineView to stay left-aligned to it when resizing the window... (I could only get it to work with small square button, and couldn't figure out why...)

phjo
phjo is offline   0 Reply With Quote
Old Mar 23, 2008, 06:16 PM   #8
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Look at this page (Size Inspector), the moving graphic shows how the object moves with resizing.

Click image for larger version

Name:	Picture 10.png
Views:	8
Size:	53.9 KB
ID:	109109
__________________
If they have to tell you every day they are fair you can bet they arent, if they tell you they are balanced then you should know they are not - Don't Hurt me
Eraserhead is offline   0 Reply With Quote
Old Mar 24, 2008, 02:01 AM   #9
phjo
Thread Starter
macrumors regular
 
Join Date: Jan 2008
Well, of course I do know about the size inspector, and played a lot with it !

How do you figure I finally got what I wanted?

The problem is I had a million of trial and fail sessions before it worked, and I have no idea why it finally worked, and why it failed previously...

You can try it yourself :
put a NSTableView and a NSOutlineView side by side, and one square button under each, left aligned with the two views. (The button will be a + button to add one row.)

The tableview on the left is configured to resize on both directions, sticking to the top, left and bottom on the window

The outlineview on the right is configured to resize on both directions, sticking to the top, right and bottom on the window

The two buttons are not resizable, and stick only to the bottom, and finally by selecting the left tableview and its associated button, I tried to declare them left-aligned, ditto for the outlineview and its button.

Now when I test the resizing in the cocoa simulator, most of the time, one of the two buttons at least do not stay left-aligned with its view, and I have no idea why sometimes it works (and then I try not to touch anything from that moment !) and the rest of the time it doesn't...

The fact that I got it to work lead me to think my understanding of the size inspector is correct, but please correct me if I am wrong...

EDIT : A split view is better for what I want to achieve as far as UI goes. I am going this route now...

phjo

Last edited by phjo; Mar 24, 2008 at 02:48 AM.
phjo is offline   0 Reply With Quote
Old Mar 24, 2008, 06:30 AM   #10
Eraserhead
macrumors G4
 
Eraserhead's Avatar
 
Join Date: Nov 2005
Location: UK
Quote:
Originally Posted by phjo View Post
The problem is I had a million of trial and fail sessions before it worked, and I have no idea why it finally worked, and why it failed previously...
What I was trying to point out is that the moving graphic on the blue background, shows how the object should move around with resizing .
__________________
If they have to tell you every day they are fair you can bet they arent, if they tell you they are balanced then you should know they are not - Don't Hurt me
Eraserhead is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
What would make images in the header pop out on top of the rest of the header? MuckrakerJG Web Design and Development 1 Feb 2, 2014 01:53 AM
Dual display window display bug? timbom3 OS X Mavericks (10.9) 3 Nov 20, 2013 03:11 AM
Allow NSOutlineView to be rearranged? ArtOfWarfare Mac Programming 2 Dec 5, 2012 10:48 PM
Issue with NSOutlineView? jaquadro Mac Programming 0 Nov 4, 2012 04:12 PM
Display bug aggie03 iPhone 0 Sep 27, 2012 09:34 PM

Forum Jump

All times are GMT -5. The time now is 09:24 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC