Cocoa list widget?

Member
Posts: 156
Joined: 2002.10
Post: #1
I want to create a Cocoa interface with a widget something like Java's List (or JList) - see http://www.cafeaulait.org/course/week6/37.html for a picture.

I can't see anything in IB that would do this, so does anyone have any ideas?

Cheers

- Iain
Quote this message in a reply
Member
Posts: 196
Joined: 2003.10
Post: #2
Seems like something you could do with an NSTableView. Turn off the column headers, turn off the horizontal scrollbar, and there you go. You'll have to use the delegate methods (correct me if I'm wrong) to provide a data source.
Quote this message in a reply
Member
Posts: 114
Joined: 2005.03
Post: #3
The alternative to delegate methods would be using Cocoa bindings, way more fun.
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #4
The data source is separate from the delegate, but it is definitely necessary to set the data source to get some data on there.

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Member
Posts: 196
Joined: 2003.10
Post: #5
Bindings are nice, yes, but they don't support 10.2. There's lots of people who haven't upgraded - I only upgraded last month.
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #6
NSTableView + delagate is just fine. Bindings are whiz-bang and all, but the old model works beautifully, and happens to be the only way to go if your model is C++ ( which in my case is 100% of the time ).
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #7
pretty sure NSBrowser is what you want, it's easy enough to turn off extra columns and stuff.
Quote this message in a reply
Post Reply