Resolved NSArrayController and table view


i learning cocoa programming working way through big nerd ranch book, " cocoa programming mac os x", forth edition. book bit dated, still teaching me basics.

questions:
1. trying set table view controlled instance of nsarrayconroller. table view has 2 columns, , make selectable, allow user edit item in first column. how can lock second column against editing?

2. there nsarraycontroller delegate or method can use alerted when user makes edit table?

thanks,
c. alan
 

look @ attributes inspector table column , nstableviewdelegate

two ways ( both doing same thing ):

(1) in nib table column deselect "editable" checkbox in attributes inspector

[​img]

(2) use seteditable: method on table column when table appears


nstableviewdelegate provides nstableview objects way intercept many common user actions. have implement delegate method. apple's docs here: https://developer.apple.com/library/mac/documentation/cocoa/reference/nstableviewdelegate_protocol/reference/reference.html
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

Carrier post Error specific

How to increase vRAM for HD3000 graphics

Carrier [Information] AT&T NEXT