• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Binding to an NSSet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding to an NSSet


  • Subject: Binding to an NSSet
  • From: Chris Backas <email@hidden>
  • Date: Fri, 5 Sep 2008 09:58:09 -0400

Hello all,

I may be overlooking a relevant piece of documentation, but I have a property which is a Set, and I want to use an NSArrayController and an NSTable to manage it. NSArrayController has a "contentSet" key that I bound to my set property without a problem, it displays in my table just fine.

However, I'm trying to get better control over inserts into this set, so I decided to implement the optional accessors. I've done this in the past with arrays using something like this:

-(NSSet*)someProperty

-(void)insertObject:(id)object inSomePropertyAtIndex:(int)index

-(void)removeObjectFromSomePropertyAtIndex:(int)index

-(void)replaceObjectInSomePropertyAtIndex:(int)index withObject: (id)object

However, these don't seem to apply to sets very well due the use of an Index. I can't seem to find alternatives suited to sets either.

Basically I need to either replace, or call methods on the new objects being inserted into the collection when NSArrayController's add: gets called.

Thanks for any help!

Chris Backas

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Binding to an NSSet
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Strange Strange Bug
  • Next by Date: Re: Core Data Form
  • Previous by thread: [MEET] : LA CocoaHeads next Thursday, 9/11 7:30pm
  • Next by thread: Re: Binding to an NSSet
  • Index(es):
    • Date
    • Thread