Changeset 314

Show
Ignore:
Timestamp:
07/07/08 08:14:09 (6 months ago)
Author:
wolf
Message:

[FIX] mogenerator 1.10.1: 10.5.4 now seems to require a call to -willAccessValueForKey: before -mutableSetValueForKey: actually works (10.5.4 dies with an exception in -[_NSNotifyingWrapperMutableSet initWithContainer:key:mutableSet:]).

Updated the machine source template file to call -(will|Did)AccessValueForKey?: for you. (Paul Herzog)

Files:

Legend:

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

    r300 r314  
    291291    if (_version) 
    292292    { 
    293         printf("mogenerator 1.10. By Jonathan 'Wolf' Rentzsch + friends.\n"); 
     293        printf("mogenerator 1.10.1. By Jonathan 'Wolf' Rentzsch + friends.\n"); 
    294294        return EXIT_SUCCESS; 
    295295    } 
  • trunk/cocoa/mogenerator/templates/machine.m.motemplate

    r300 r314  
    9393 
    9494- (NSMutableSet*)<$Relationship.name$>Set { 
    95         return [self mutableSetValueForKey:@"<$Relationship.name$>"]; 
     95        [self willChangeValueForKey:@"<$Relationship.name$>"]; 
     96        NSMutableSet *result = [self mutableSetValueForKey:@"<$Relationship.name$>"]; 
     97        [self didChangeValueForKey:@"<$Relationship.name$>"]; 
     98        return result; 
    9699} 
    97100        <$else$>