Loading a Document Based Application
Loading a Document Based Application
- Subject: Loading a Document Based Application
- From: Ivan Myrvold <email@hidden>
- Date: Sat, 16 Jun 2001 03:10:39 +0400
I have read through all the documentation I have for a Document based
application, to see if it can solve my problem. Now I think I need some
help from you, on how to best tackle this:
I used the Vermont Recipes as a recipe for my application, and I have
come to the part where I need to load data from file, and put the data
in the TableView on my MyDocument.nib. The recipes haven't handled this
yet...
The problem is this:
I have implemented loadDataRepresentatio:ofType: in MyDocument.m. The
result is an NSArray object, that contains the data I want to fill the
table with.
I have implemented tableView:objectValueForTableColumn:row: and
numberOfRowsInTableView: in MyWindowController.m.
Now, my dilemma is: The data and the methods that need the data are in
two different Classes. Have I in my ignorance overseen something
significant here? Is this the "right" way to do this? I know there are
an infinite number of ways to transfer data from file to the
application, I have seen that from examples posted on this list, but I
thought I would follow the wonderful Vermont recipes "way" of
structuring the application.
How to populate a TableView I took from Scott Anguish's
"SetTheTableView" posting a couple of days ago. Thank you guys, with
your help I think I will eventually make myself a Cocoa programmer.
Ivan C Myrvold
Learning new Cocoa tricks every day!