NSArray NSTreeController subset....

Discussion in 'Mac Programming' started by BollywooD, Aug 10, 2009.

  1. BollywooD macrumors 6502

    BollywooD

    Joined:
    Apr 27, 2005
    Location:
    Surfers Paradise
    #1
    Im stumped.
    I have an NSTreeController, which is a subset of an NSArray. Contained in both is are objects which are flagged as favorites, or non favorites. I want to save only differences between the two, into a new NSArray.

    for example:

    NSArray has the following objects:
    apple (favorite)
    orange
    carrot
    banana
    pear (favorite)

    NSTreeController
    apple
    orange (favorite)


    I would like to have a new combined NSArray, with the following objects:
    apple
    orange (favorite)
    carrot
    banana
    pear (favorite)


    how would I go about doing this?

    thanks in advance
    :confused:
     
  2. BollywooD thread starter macrumors 6502

    BollywooD

    Joined:
    Apr 27, 2005
    Location:
    Surfers Paradise
    #2
    I just discovered NSSet does exactly I need, as it only stores unique objects.
     

Share This Page