• 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
Re: Need help with -mutableSetValueForKey:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help with -mutableSetValueForKey:


  • Subject: Re: Need help with -mutableSetValueForKey:
  • From: Wain <email@hidden>
  • Date: Fri, 21 Sep 2007 15:29:05 +0100

Hi,

I think you want to implement:

- countOfThings
- objectInThingsAtIndex:
- insertObject:inThingsAtIndex:
- removeObjectFromThingsAtIndex:

And you may want to also implement:

- getThings:range:
- replaceObjectInThingsAtIndex:withObject:

Hope that helps,

Wain

On 21 Sep 2007, at 15:14, David Spooner wrote:


I'm having difficulty implementing a kvc-compliant set property using methods. Say I have an object with a property called 'things'. The documentation for -mutableSetValueForKey: specifies the additional methods required for 'things' to be a mutable set :


- (void) addThingsObject:
- (void) removeThingsObject:

and refers to the documentation for -valueForKey: for the prerequisites of an immutable set. These appear to be missing. I have tried

- (unsigned int) countOfThings;
- (BOOL) containsThingsObject:(id)object;
- (NSEnumerator *) thingsEnumerator;

to no avail -- an exception complaining of non-compliance is raised on invoking [object mutableSetValueForKey:@"things"].

Thanks in advance,

dave

_______________________________________________

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


References: 
 >Need help with -mutableSetValueForKey: (From: David Spooner <email@hidden>)

  • Prev by Date: Re: new class
  • Next by Date: Re: Need help with -mutableSetValueForKey:
  • Previous by thread: Need help with -mutableSetValueForKey:
  • Next by thread: Re: Need help with -mutableSetValueForKey:
  • Index(es):
    • Date
    • Thread