Skip to content

Commit

Permalink
Fix object type in replaceObjectInFooAtIndex:withObject:
Browse files Browse the repository at this point in the history
The generated .m files should use the object class in

- (void)replaceObjectInFoosAtIndex:(NSUInteger)idx withObject:(Foo*)value

rather than the collection class (eg - (void)replaceObjectInFoosAtIndex:(NSUInteger)idx withObject:(NSOrderedSet*)value)
  • Loading branch information
jdelStrother committed Aug 7, 2014
1 parent d3a3cde commit 3a71d46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/machine.m.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ const struct <$managedObjectClassName$>UserInfo <$managedObjectClassName$>UserIn
[self setPrimitiveValue:tmpOrderedSet forKey:@"<$Relationship.name$>"];
[self didChange:NSKeyValueChangeRemoval valuesAtIndexes:indexes forKey:@"<$Relationship.name$>"];
}
- (void)replaceObjectIn<$Relationship.name.initialCapitalString$>AtIndex:(NSUInteger)idx withObject:(<$Relationship.immutableCollectionClassName$>*)value {
- (void)replaceObjectIn<$Relationship.name.initialCapitalString$>AtIndex:(NSUInteger)idx withObject:(<$Relationship.destinationEntity.managedObjectClassName$>*)value {
NSIndexSet* indexes = [NSIndexSet indexSetWithIndex:idx];
[self willChange:NSKeyValueChangeReplacement valuesAtIndexes:indexes forKey:@"<$Relationship.name$>"];
NSMutableOrderedSet *tmpOrderedSet = [NSMutableOrderedSet orderedSetWithOrderedSet:[self <$Relationship.name$>]];
Expand Down

0 comments on commit 3a71d46

Please sign in to comment.