0

I have a simple program that stores purchase information in a core data store. The model is similar to the following.

Entities: Student(lastName,firstName) relationship to (BoughtPackage)

BoughtPackage relationship to (Payment) and (Package)

Payment(type,amount)

Package(name,price)

Structure looks like enter image description here

I would like to first display the list of students in a table, then format the purchases made my that individual student in a details table.

So far, I have been able to create an NSArrayController to hold the data of the Student entity, but cannot figure out how to propagate the purchase detail table. How would I accomplish this using IB alone, or is it possible? If so, how would I do it programmatically?

mmmmmm
  • 32,227
  • 27
  • 88
  • 117
willseward
  • 113
  • 1
  • 1
  • 8

1 Answers1

0

Yes it is possible to do this mostly in IB without writing any code. But thats too broad a question for a SO answer

You really need to read

https://developer.apple.com/library/mac/#documentation/cocoa/conceptual/cocoabindings/cocoabindings.html

and theres a tutorial in the docset titled

Introduction to Developing Cocoa Applications Using Bindings: A Tutorial

which i can't find a web link for. Just search the title.

But sort out your model too. It looks like all your relationships are one-to-one

For example. I would expect that a Student may have many BoughtPackages hence a one-to-many relationship there and the same with BoughtPackage to Payment.

Good luck

Warren Burton
  • 17,451
  • 3
  • 53
  • 73