 |
 |
NSTableView question
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: Texas
Status:
Offline
|
|
Here is a good question for everyone. In a NSTableView, how do you add sub table? ie, you click on a triangle and it expands to show a few more rows? If someone could help on that it would be greatly appreciated. Oh and if you need more info, just ask!
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
Originally posted by djohnson:
Here is a good question for everyone. In a NSTableView, how do you add sub table? ie, you click on a triangle and it expands to show a few more rows? If someone could help on that it would be greatly appreciated. Oh and if you need more info, just ask!
Isn't that a different kind of control? There is an element in IB which looks like the Finder tree view with columns.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status:
Offline
|
|
yes, it's called NSOutlineView, a subclass of NSTableView
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: Texas
Status:
Offline
|
|
No, it is a NSTableView that I need to use. I know it can be done somehow, I just dont know how.... yet! It would be similiar to how iTunes expands the table.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: Texas
Status:
Offline
|
|
Originally posted by Uncle Skeleton:
yes, it's called NSOutlineView, a subclass of NSTableView
Ok, you got that while I was typing my reply. I will check on it now. Thanks!
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: Texas
Status:
Offline
|
|
*Fat Albert voice* Hey hey hey!!!
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status:
Offline
|
|
Originally posted by djohnson:
No, it is a NSTableView that I need to use. I know it can be done somehow, I just dont know how.... yet! It would be similiar to how iTunes expands the table.
huh? where is this in iTunes?
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: Texas
Status:
Offline
|
|
Originally posted by Uncle Skeleton:
huh? where is this in iTunes?
When you access the playlist from another computer, you can expand it. Also on the free radio stations. I am guessing it is the same.
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status:
Offline
|
|
hmm, never saw that before. Anyway, it's probably not exactly the same since iTunes is Carbon and its table view has significant differences from NSTableViews. But from 10 seconds of playing with it I can't find any differences.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: Texas
Status:
Offline
|
|
Yeah it will be a little different, but it should work fine. I will see tonight though...
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
I think you want NSOutlineView, which is a subclass of NSTableView.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: Texas
Status:
Offline
|
|
Yeah I figred that out already....
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
That's what I get for not reading the thread properly. Doh!
I'll add a pseudo-useful comment that there's some decent sample code in /Developer/Examples/AppKit (OutlineView and DragNDropOutlineView).
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 2000
Location: Texas
Status:
Offline
|
|
Just an update for those that might need to use a NSOutlineView in the future... Here is an awesome link with code, that once modified to fit your code, will work wonderfully.
http://www.cocoadev.com/index.pl?NSO...ViewDataSource
So far this NSOutlineView has been the most difficult part of Cocoa/Objective-C to wrap my brain around, but well worth the effort!!!! 
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|