-[NSOutlineView setAutosaveTableColumns:YES] and growing column widths
-[NSOutlineView setAutosaveTableColumns:YES] and growing column widths
- Subject: -[NSOutlineView setAutosaveTableColumns:YES] and growing column widths
- From: "John C. Daub" <email@hidden>
- Date: Tue, 14 Nov 2006 15:29:29 -0600
- Thread-topic: -[NSOutlineView setAutosaveTableColumns:YES] and growing column widths
Hello.
I have an NSOutlineView where I have -setAutosaveName:@"Foo" and
-setAutosaveTableColumns:YES. The user is allowed to resize the columns,
rearrange the columns, thus these are things I wish to preserve. However,
I've noticed that my first column (the one with the disclosure triangles)
grows in width over time. It seems to be growing by the amount of indent for
each level disclosed.
You can see this using Apple's DragNDropOutlineView sample code. To
-[AppController awakeFromNib] add:
[outlineView setAutosaveName:@"DragNDropTable"];
[outlineView setAutosaveTableColumns:YES];
Build the sample and run. Note the width of the 1st column. Take the first
item/row and disclose it, then keep disclosing deeper and deeper. Note the
width of the 1st column. Quit the app. Relaunch the app. Note the 1st column
width is now wider, at the point it was widened to from all the previous
disclosures. You can repeat this as often as you'd like... the column width
forever growing and being preserved. This isn't desired because eventually
your 1st column gets mighty wide; a user shouldn't have to deal with that.
Since I can reproduce this in an Apple sample, I'm wont to believe this is
error on my part, that I'm not setting something up correctly, thus I get
this behavior. Am I doing something wrong? Is there a way to correct/prevent
this behavior? Maybe a hack/workaround for it?
I tried searching mailing list archives and documentation but didn't find
anything. I may have used the wrong keywords to search by.
Thank you.
--
John C. Daub }:-)>=
<mailto:email@hidden> <http://www.hsoi.com/>
"Learn to be still." - Don Henley, the Eagles.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden