The Little NSOutlineView That Couldn't
The Little NSOutlineView That Couldn't
- Subject: The Little NSOutlineView That Couldn't
- From: David Wood <email@hidden>
- Date: Fri, 6 Jun 2003 11:12:53 -0400
Yes it's me again and I'm still struggling with NSOutlineView. I'm
trying to build the thing I'm working on up slowly, and have run into
an impasse I can't figure out.
(And before you say it, YES I've got several books on Cocoa
programming, and YES I've looked at the sample source code in the
Developer folder. Especially DragNDropOutlineView.)
Here's the series of steps up to where things don't work right:
1. The document NIB contains two NSOutlineViews. Both have the main
document set as their delegates, but because there are two of them in
the main window, each has its own dataSource. At present I'm only
working with one of them; it is proving trouble enough.
2. Rather than instantiate the datasource, I had the document allocate
it and then sent a setDataSource: during the awakeFromNib phase when it
was first read up from the NIB. And YES, I verified it with copious
NSLog statements; the NSOutlineView's dataSource method correctly
returns the data source I point it to, so it IS accepted.
3. If the data source contains any objects, they get displayed when the
window first comes up. This is good. However, after I add more objects
to the data source during the run, they don't get displayed, no matter
how I try to poke the NSOutlineView in the side. reloadData:,
setNeedsDisplay:, and so forth do nothing. I verify with NSLogs that
the dataSource contains more items, but the NSOutlineView never
displays them.
Anyone care to suggest things I could try? Or does anyone know of any
circumstances where something like this happens?
--David
http://skipjack.bluecrab.org/~dwood
"Only a really good technician can completely insulate management from
the ugly inner workings of a complicated system.
And only a bad manager would willingly accept that insulation."
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.