mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-10 02:40:59 +00:00
A number of set and array fixes and added tests for unordered accessor pattern in key value coding.
Reviewed by me.
This commit is contained in:
1 parent
232f1d008d
commit
9b75e37e1f
4 files changed
+97
-6
No files matched your search
@@ -356,6 +356,12 @@ var CPObjectAccessorsForClassKey = @"$CPObjectAccessorsForClassKey",
|
||||
SEL _memberOfSelector;
|
||||
}
|
||||
|
||||
// This allows things like setByAddingObject: to work (since they use [[self class] alloc] internally).
|
||||
- (id)initWithObjects:(CPArray)objects count:(CPUInteger)aCount
|
||||
{
|
||||
return [[CPSet alloc] initWithObjects:objects count:aCount];
|
||||
}
|
||||
|
||||
- (id)initWithTarget:(id)aTarget key:(CPString)aKey
|
||||
{
|
||||
self = [super initWithObjects:nil count:0];
|
||||
@@ -368,7 +374,7 @@ var CPObjectAccessorsForClassKey = @"$CPObjectAccessorsForClassKey",
|
||||
|
||||
_countOfSelector = CPSelectorFromString("countOf" + capitalizedKey);
|
||||
_enumeratorOfSelector = CPSelectorFromString("enumeratorOf" + capitalizedKey);
|
||||
_memberOfSelector = CPSelectorFromString("memberOf" + capitalizedKey);
|
||||
_memberOfSelector = CPSelectorFromString("memberOf" + capitalizedKey + ":");
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
Reference in new issue
Block a user