364 hour 20:using nstableview on mac...

13
FIGURE 20.1 You can use automatic identifiers.

Upload: lamdang

Post on 03-May-2018

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

364 HOUR 20: Using NSTableView on Mac OS

FIGURE 20.1You can useautomatic identifiers.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 364

Page 2: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

Exploring the New NSTableView Features 365

FIGURE 20.2Build a Mac OSapp with CoreData and bindings.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 365

Page 3: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

366 HOUR 20: Using NSTableView on Mac OS

FIGURE 20.3Create the project.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 366

Page 4: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

Building an NSTableView App 367

FIGURE 20.4Create yourdata model.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 367

Page 5: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

368 HOUR 20: Using NSTableView on Mac OS

FIGURE 20.5Add an arraycontroller.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 368

Page 6: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

[(H3F)] 369

FIGURE 20.6Set the entityname in theAttributesinspector.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 369

Page 7: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

370 [(H1F)]: [(H2F)]

FIGURE 20.7Bind the con-troller to theapp delegate.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 370

Page 8: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

Building an NSTableView App 371

FIGURE 20.8Add a tableview.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 371

Page 9: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

372 HOUR 20: Using NSTableView on Mac OS

FIGURE 20.9Select the tablecolumn to connect to thearray controller.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 372

Page 10: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

[(H3F)] 373

FIGURE 20.10Bind thecolumn value to the arraycontroller.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 373

Page 11: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

374 [(H1F)]: [(H2F)]

FIGURE 20.11Insert an Addbutton.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 374

Page 12: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

Building an NSTableView App 375

FIGURE 20.12Connect theAdd button.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 375

Page 13: 364 HOUR 20:Using NSTableView on Mac OSptgmedia.pearsoncmg.com/.../downloads/20_9780672336195_ch20.qxd.pdfExploring the New NSTableView Features 365 FIGURE 20.2 Build a Mac OS app

376 HOUR 20: Using NSTableView on Mac OS

FIGURE 20.13Run the app.

20_9780672336195_ch20.qxd 6/13/12 12:59 PM Page 376