Hi everyone,
I am an experienced Windows C++ programmer, but quite new to Mac os
programming.
I have just started to evaluate Core Data framework by using it to put
together a small database.
Let's explain my problem with usual Employee, Department example.
I have created Employee and Department entities, each with their own set
of
attributes.
There is To-Many relationship called "employees" defined for Department
with
Employee as destination.
There is also To-One relationship called "department" defined for Student
with Department as destination.
In my user interface I have two NSTableView : Employee NSTableView that
allows user to enter list of employees attributes by calling add, remove
methods of EmployeeArrayController. Department NSTableView that allows
user to enter list of departments attributes by calling add, remove
methods
of DepartmentArrayController.
What I don't understand is
1. How to actually add data to tables using the UI, eg: how to select
John
from the list of employees and tell to the framework that John is in the
Sales department and so on, so that I can assign all employees to their
departments.
2. After I did that task the next question is what is the best way to
display data for example how to select a department from list of
departments
and as a result all employees in that department are displayed
Thanks for any help.
Luca


|