• 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 a TableView with pre-existing data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filling a TableView with pre-existing data


  • Subject: Re: filling a TableView with pre-existing data
  • From: Scott Frankel <email@hidden>
  • Date: Mon, 1 May 2006 16:04:45 -0700


I hope my question made sense. I've got an NSTableView that I want to use to display rows of data from a database. I'm using Bindings, KVC-style accessors, and an NSArrayController to manage the model- view data flow. But I'm having trouble turning the spigot on ;) I'm not getting my data rows to display in the tableView.


The most promising approach seems to be overriding awakeFromNib: in MyDocument.m. How would I connect the NSArrayController to this layer of the app's controller? Am I barking up the right tree at least?

Thanks again!
Scott


p.s. I've read Apple's doco on bindings and am following Hillegas' book; so I can create data from scratch in my tableView. Still, how do I load data that already exists into an NSTableView?





On May 1, 2006, at 10:37 AM, Scott Frankel wrote:


How does one fill an NSTableView, set up to use bindings, with pre- existing data?


If a nib file's NSArrayController's ObjectClassName parameter corresponds with an implementation file of a class I created with KVC-style accessors (the M-V-C model), then shouldn't the model class' init: method get called when I run the app? I note that my init: method's NSLog statement is never returned.

Seems that somewhere, I'm not connecting the dots.

Following the property list Dict example in http:// developer.apple.com/documentation/Cocoa/Conceptual/TableView/ index.html#//apple_ref/doc/uid/10000026i), where should this Dict live so that the NSTableView's NSArrayController can find the data and display it? In the model class' init: method? Is there a method I should be overriding to trigger a data load?

Thanks in advance!
Scott








_______________________________________________ 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

_______________________________________________ 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
  • Follow-Ups:
    • Re: filling a TableView with pre-existing data
      • From: Ondra Cada <email@hidden>
    • Re: filling a TableView with pre-existing data
      • From: "I. Savant" <email@hidden>
References: 
 >filling a TableView with pre-existing data (From: Scott Frankel <email@hidden>)

  • Prev by Date: Re: Animated split view collapsing
  • Next by Date: Re: filling a TableView with pre-existing data
  • Previous by thread: filling a TableView with pre-existing data
  • Next by thread: Re: filling a TableView with pre-existing data
  • Index(es):
    • Date
    • Thread