Binding to an NSSet
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