Re: NSTreeNode -representedObject not KVC-Compliant

  • Seems like I had missed this before, was just reading up on
    nscontroller and bindings and such, but if I added "self" as the model
    key path after "selection" as the controller key on the second
    controller, all works just fine.  I don't recall running into this at
    all when using array controllers, but worked just fine in this master-
    detail use of tree controllers.

    http://www.cocoabuilder.com/archive/message/cocoa/2005/5/19/136419

    Hope that helps someone else out there.
  • On Dec 24, 2007, at 3:15 AM, Matt Brewer wrote:

    > Seems like I had missed this before, was just reading up on
    > nscontroller and bindings and such, but if I added "self" as the
    > model key path after "selection" as the controller key on the second
    > controller, all works just fine.  I don't recall running into this
    > at all when using array controllers, but worked just fine in this
    > master-detail use of tree controllers.
    >
    > http://www.cocoabuilder.com/archive/message/cocoa/2005/5/19/136419
    >
    > Hope that helps someone else out there.

    Incidentally, new sample code came out today for NSTreeController,
    Core Data, and Bindings

    http://developer.apple.com/samplecode/AbstractTree/index.html

    AbstractTree is a Cocoa sample application that demonstrates how to
    use Core Data and Bindings with NSTreeController. The data model is
    intentionally simple and abstract - you can extend it to any
    hierarchical model suitable for your problem domain. Likewise, the
    user interface is minimal - just an outline view and buttons for
    creating and removing nodes in the tree. In addition, the project
    shows how to implement drag and drop for managing parent-child
    relationships of the Core Data content.
  • Awesome, I'll be looking up on that.  I wasn't actually using Core
    Data, but examples are examples!

    Thanks again

    On Dec 24, 2007, at 3:34 AM, Scott Anguish wrote:

    >
    > On Dec 24, 2007, at 3:15 AM, Matt Brewer wrote:
    >
    >> Seems like I had missed this before, was just reading up on
    >> nscontroller and bindings and such, but if I added "self" as the
    >> model key path after "selection" as the controller key on the
    >> second controller, all works just fine.  I don't recall running
    >> into this at all when using array controllers, but worked just fine
    >> in this master-detail use of tree controllers.
    >>
    >> http://www.cocoabuilder.com/archive/message/cocoa/2005/5/19/136419
    >>
    >> Hope that helps someone else out there.
    >
    > Incidentally, new sample code came out today for NSTreeController,
    > Core Data, and Bindings
    >
    > http://developer.apple.com/samplecode/AbstractTree/index.html
    >
    > AbstractTree is a Cocoa sample application that demonstrates how to
    > use Core Data and Bindings with NSTreeController. The data model is
    > intentionally simple and abstract - you can extend it to any
    > hierarchical model suitable for your problem domain. Likewise, the
    > user interface is minimal - just an outline view and buttons for
    > creating and removing nodes in the tree. In addition, the project
    > shows how to implement drag and drop for managing parent-child
    > relationships of the Core Data content.
    >
    >
    >
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today