Talk About Network

Google





Mac > Mac Programmer Tools > Re: Core Data U...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 580 of 637
Post > Topic >>

Re: Core Data UI

by Chris Hanson <cmh@[EMAIL PROTECTED] > Jan 23, 2007 at 01:07 AM

On 2007-01-23 00:24:25 -0800, "Luca_a" <nojunk@[EMAIL PROTECTED]
> said:

> 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

Both of these should be explicitly covered -- in Employee and 
Department terms, even -- in one of the tutorials.

Apple has a good video tutorial here:

  http://developer.apple.com/cocoa/coredatatutorial/index.html

Scott Stevenson has a good tutorial here:

  http://cocoadevcentral.com/articles/000085.php

The main idea I think you're looking for is to use NSArrayController 
instances set to entity mode to manage the table views, pop-up menus, 
and such for your interface.  The tutorials above, and others you can 
find by searching for "Core Data tutorial" cover this in some depth.

In particular, to create a master-detail interface, bind the content 
set of (say) an employee array controller to a department array 
controller's selected objects' employees.  This means that instead of 
all instances of the Employee entity, the employee array controller 
will only control those available via the "employees" relation****p of 
the selected Department instance or instances.

  -- Chris
 




 4 Posts in Topic:
Core Data UI
"Luca_a" <no  2007-01-23 17:24:25 
Re: Core Data UI
Chris Hanson <cmh@[EMA  2007-01-23 01:07:43 
Re: Core Data UI
"Luca_a" <no  2007-01-25 16:43:14 
Re: Core Data UI
David Phillip Oster <o  2007-01-24 05:38:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 23:04:04 PST 2009.