Core Data and multiple selection?

  • Folks,

    I've got your typical iTunes type of two-table layout working fine
    with Core Data where the range of rows shown in the right table are
    dependant upon the relationship signified by the selection of a row in
    the left table (i.e. the source list).  All this works using the array
    controllers and contentSet bindings.

    However, what if I want multiple selection permitted on the source
    list?  Prior to Core Data I've got that working by allowing multiple
    selection on the source list table view and having the array
    controller behind the right hand table (the detail records) bind its
    contentArrayForMultipleSelection to the master array controller
    selectedObjects controller key using the key path of
    @unionOfArrays.items where items is the path for the detail records.

    This doesn't work for Core Data because it wants to use the contentSet
    binding and I can't seem to use any controller key other than
    selection (can't use selectedObjects and @union...) without producing
    an error.

    Any ideas?  Is it possible to do this with bindings and Core Data?

    Gavin
  • On May 11, 2005, at 8:07 AM, Gavin McKenzie wrote:

    > This doesn't work for Core Data because it wants to use the contentSet
    > binding and I can't seem to use any controller key other than
    > selection (can't use selectedObjects and @union...) without producing
    > an error.
    >
    > Any ideas?  Is it possible to do this with bindings and Core Data?

    Bind contentArrayForMultipleSelection to @unionOfSets.key.

    Jim