Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSTableView question

NSTableView question
Thread Tools
Professional Poster
Join Date: Sep 2000
Location: Texas
Status: Offline
Reply With Quote
Apr 2, 2004, 10:12 AM
 
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
Reply With Quote
Apr 2, 2004, 10:43 AM
 
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
Reply With Quote
Apr 2, 2004, 11:00 AM
 
yes, it's called NSOutlineView, a subclass of NSTableView
     
Professional Poster
Join Date: Sep 2000
Location: Texas
Status: Offline
Reply With Quote
Apr 2, 2004, 11:03 AM
 
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
Reply With Quote
Apr 2, 2004, 11:10 AM
 
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
Reply With Quote
Apr 2, 2004, 11:12 AM
 
*Fat Albert voice* Hey hey hey!!!
     
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Apr 2, 2004, 11:59 AM
 
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
Reply With Quote
Apr 2, 2004, 12:09 PM
 
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
Reply With Quote
Apr 2, 2004, 02:04 PM
 
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
Reply With Quote
Apr 2, 2004, 02:12 PM
 
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
Reply With Quote
Apr 3, 2004, 03:44 AM
 
I think you want NSOutlineView, which is a subclass of NSTableView.
     
Professional Poster
Join Date: Sep 2000
Location: Texas
Status: Offline
Reply With Quote
Apr 3, 2004, 02:01 PM
 
Yeah I figred that out already....
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Apr 3, 2004, 02:15 PM
 
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
Reply With Quote
Apr 22, 2004, 06:13 PM
 
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!!!!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:06 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2