Swift Bindings won't work Xcode 6 Beta 5

前端 未结 3 2040
生来不讨喜
生来不讨喜 2021-01-04 08:52

I\'m doing a simple test program using bindings in Swift on OSX. Having an NSTableView, NSArrayController and a model class I try to hook them up together, but without succe

3条回答
  •  攒了一身酷
    2021-01-04 09:32

    Are you using NSCell or NSView based tables? How you set up bindings is different for these. What you are doing looks correct for NSCell based tables.

    When I set up a NSTableView today, it was a NSView based table, so I had to select the TextField and bind to "Table Cell View" with a Model Key Path "objectValue.name"

    See the Table View Programming Guide for Mac: Populating a Table View Using Cocoa Bindings documentation

提交回复
热议问题