• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Filling TableView with array of strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filling TableView with array of strings


  • Subject: Re: Filling TableView with array of strings
  • From: Scott Stevenson <email@hidden>
  • Date: Sun, 17 Oct 2004 15:10:52 -0700


On Oct 17, 2004, at 2:35 PM, Austin Sarner wrote:

Basically I have no clue how to utilize the data source for a tableview - and after looking through various examples online I discovered that most people used a dictionary.
[...]
However, because it's simply a set of strings (the name property of each folder) that needs to go into the tableview...I see no need for one. In RB you would loop through the array of folders adding a row for its name string value - of course I'm not exactly sure how to go about acheiving the same effect in cocoa. Thankyou very much.


- (id) tableView:(NSTableView *) table objectValueForTableColumn:(NSTableColumn *) column row:(int) row
{
id folderList = [[self folderController] folderList];
return [[folderList objectAtIndex: row] name];
}

- (int)numberOfRowsInTableView:(NSTableView *)table
{
id folderList = [[self folderController] folderList];
return [folderList count];
}


Two other little questions: is there any native way to make those cool gradient listboxes?

Not sure what you mean.


Also is there a 'styledtext' class - basically an object i can use effectively as a fake textview that maintains styles, pictures, and such and then can be loaded into the view (or would simply writing the file out be a better method?)

Why not just use a non-fake NSTextView? :)

- Scott


--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]

_______________________________________________
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
References: 
 >Filling TableView with array of strings (From: Austin Sarner <email@hidden>)

  • Prev by Date: Re: Bindings for NSTextFields
  • Next by Date: CustomView as TitleBar
  • Previous by thread: Filling TableView with array of strings
  • Next by thread: CustomView as TitleBar
  • Index(es):
    • Date
    • Thread