Changeset 342

Show
Ignore:
Timestamp:
10/11/08 19:03:04 (3 months ago)
Author:
wolf
Message:

[NEW] mogenerator 1.13: updated the template for machine's -setWhatever:(NSSet*)value_ to stop using -setPrimitiveValue: directly, as instructed by [Apple's documentation][1]. (Sean McBride? and Pascal Augustin)

[1]: http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSManagedObject_Class/Reference/NSManagedObject.html#//apple_ref/occ/instm/NSManagedObject/setPrimitiveValue:forKey:

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cocoa/mogenerator/mogenerator.m

    r325 r342  
    333333    if (_version) 
    334334    { 
    335         printf("mogenerator 1.12. By Jonathan 'Wolf' Rentzsch + friends.\n"); 
     335        printf("mogenerator 1.13. By Jonathan 'Wolf' Rentzsch + friends.\n"); 
    336336        return EXIT_SUCCESS; 
    337337    } 
  • trunk/cocoa/mogenerator/mogeneratorTestMule/MOs/_ParentMO.m

    r335 r342  
    359359 
    360360- (void)setChildren:(NSSet*)value_ { 
    361         [self willChangeValueForKey:@"children"]; 
    362         [self setPrimitiveValue:value_ forKey:@"children"]; 
    363         [self didChangeValueForKey:@"children"]; 
     361        [self willChangeValueForKey:@"children" withSetMutation:NSKeyValueSetSetMutation usingObjects:value_]; 
     362        [[self primitiveValueForKey:@"children"] setSet:value_]; 
     363        [self didChangeValueForKey:@"children" withSetMutation:NSKeyValueSetSetMutation usingObjects:value_]; 
    364364} 
    365365 
  • trunk/cocoa/mogenerator/templates/machine.m.motemplate

    r324 r342  
    5959 
    6060- (void)set<$Relationship.name.initialCapitalString$>:(NSSet*)value_ { 
    61         [self willChangeValueForKey:@"<$Relationship.name$>"]; 
    62         [self setPrimitiveValue:value_ forKey:@"<$Relationship.name$>"]; 
    63         [self didChangeValueForKey:@"<$Relationship.name$>"]; 
     61        [self willChangeValueForKey:@"<$Relationship.name$>" withSetMutation:NSKeyValueSetSetMutation usingObjects:value_]; 
     62        [[self primitiveValueForKey:@"<$Relationship.name$>"] setSet:value_]; 
     63        [self didChangeValueForKey:@"<$Relationship.name$>" withSetMutation:NSKeyValueSetSetMutation usingObjects:value_]; 
    6464} 
    6565