Changeset 294

Show
Ignore:
Timestamp:
02/27/08 08:53:31 (11 months ago)
Author:
wolf
Message:

[NEW] mogenerator 1.8: Ruotger Skupin reported that mogenerator didn't support 10.5's new transformable attributes. Added. "NSObject" is used as the type unless you add a "attributeValueClassName" key to the attributes's user info (with its value set to the desired class name).

Files:

Legend:

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

    r283 r294  
    6767- (NSString*)scalarAttributeType; 
    6868- (BOOL)hasDefinedAttributeType; 
     69- (NSString*)objectAttributeType; 
    6970@end 
    7071@implementation NSAttributeDescription (scalarAttributeType) 
     
    109110- (BOOL)hasDefinedAttributeType { 
    110111        return [self attributeType] != NSUndefinedAttributeType; 
     112} 
     113- (NSString*)objectAttributeType { 
     114#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050 
     115    #define NSTransformableAttributeType 1800 
     116#endif 
     117    if ([self attributeType] == NSTransformableAttributeType) { 
     118        NSString *result = [[self userInfo] objectForKey:@"attributeValueClassName"]; 
     119        return result ? result : @"NSObject"; 
     120    } else { 
     121        return [self attributeValueClassName]; 
     122    } 
    111123} 
    112124@end 
     
    271283    if (_version) 
    272284    { 
    273         printf("mogenerator 1.7. By Jonathan 'Wolf' Rentzsch + friends.\n"); 
     285        printf("mogenerator 1.8. By Jonathan 'Wolf' Rentzsch + friends.\n"); 
    274286        return EXIT_SUCCESS; 
    275287    } 
  • trunk/cocoa/mogenerator/mogenerator.xcodeproj/wolf.mode1v3

    r289 r294  
    198198        <array/> 
    199199        <key>OpenEditors</key> 
    200         <array/> 
     200        <array> 
     201                <dict> 
     202                        <key>Content</key> 
     203                        <dict> 
     204                                <key>PBXProjectModuleGUID</key> 
     205                                <string>7942A4AF0D7603A40097D2DE</string> 
     206                                <key>PBXProjectModuleLabel</key> 
     207                                <string>mogenerator.m</string> 
     208                                <key>PBXSplitModuleInNavigatorKey</key> 
     209                                <dict> 
     210                                        <key>Split0</key> 
     211                                        <dict> 
     212                                                <key>PBXProjectModuleGUID</key> 
     213                                                <string>7942A4B00D7603A40097D2DE</string> 
     214                                                <key>PBXProjectModuleLabel</key> 
     215                                                <string>mogenerator.m</string> 
     216                                                <key>_historyCapacity</key> 
     217                                                <integer>0</integer> 
     218                                                <key>bookmark</key> 
     219                                                <string>7942A4B20D7603A40097D2DE</string> 
     220                                                <key>history</key> 
     221                                                <array> 
     222                                                        <string>7942A4B10D7603A40097D2DE</string> 
     223                                                </array> 
     224                                        </dict> 
     225                                        <key>SplitCount</key> 
     226                                        <string>1</string> 
     227                                </dict> 
     228                                <key>StatusBarVisibility</key> 
     229                                <true/> 
     230                        </dict> 
     231                        <key>Geometry</key> 
     232                        <dict> 
     233                                <key>Frame</key> 
     234                                <string>{{0, 20}, {1096, 762}}</string> 
     235                                <key>PBXModuleWindowStatusBarHidden2</key> 
     236                                <false/> 
     237                                <key>RubberWindowFrame</key> 
     238                                <string>542 210 1096 803 0 0 2560 1578 </string> 
     239                        </dict> 
     240                </dict> 
     241                <dict> 
     242                        <key>Content</key> 
     243                        <dict> 
     244                                <key>PBXProjectModuleGUID</key> 
     245                                <string>7942A4B30D7603A40097D2DE</string> 
     246                                <key>PBXProjectModuleLabel</key> 
     247                                <string>NSAttributeDescription.h</string> 
     248                                <key>PBXSplitModuleInNavigatorKey</key> 
     249                                <dict> 
     250                                        <key>Split0</key> 
     251                                        <dict> 
     252                                                <key>PBXProjectModuleGUID</key> 
     253                                                <string>7942A4B40D7603A40097D2DE</string> 
     254                                                <key>PBXProjectModuleLabel</key> 
     255                                                <string>NSAttributeDescription.h</string> 
     256                                                <key>_historyCapacity</key> 
     257                                                <integer>0</integer> 
     258                                                <key>bookmark</key> 
     259                                                <string>7942A4B70D7603A40097D2DE</string> 
     260                                                <key>history</key> 
     261                                                <array> 
     262                                                        <string>7942A4B50D7603A40097D2DE</string> 
     263                                                </array> 
     264                                        </dict> 
     265                                        <key>SplitCount</key> 
     266                                        <string>1</string> 
     267                                </dict> 
     268                                <key>StatusBarVisibility</key> 
     269                                <true/> 
     270                        </dict> 
     271                        <key>Geometry</key> 
     272                        <dict> 
     273                                <key>Frame</key> 
     274                                <string>{{0, 20}, {1035, 824}}</string> 
     275                                <key>PBXModuleWindowStatusBarHidden2</key> 
     276                                <false/> 
     277                                <key>RubberWindowFrame</key> 
     278                                <string>107 624 1035 865 0 0 2560 1578 </string> 
     279                        </dict> 
     280                </dict> 
     281        </array> 
    201282        <key>PerspectiveWidths</key> 
    202283        <array> 
     
    232313                        <array> 
    233314                                <dict> 
    234                                         <key>BecomeActive</key> 
    235                                         <true/> 
    236315                                        <key>ContentConfiguration</key> 
    237316                                        <dict> 
     
    270349                                                        <array> 
    271350                                                                <string>08FB7794FE84155DC02AAC07</string> 
     351                                                                <string>1AB674ADFE9D54B511CA2CBB</string> 
    272352                                                                <string>1C37FABC05509CD000000102</string> 
    273353                                                        </array> 
     
    299379                                                </array> 
    300380                                                <key>RubberWindowFrame</key> 
    301                                                 <string>495 496 690 397 0 0 1680 1028 </string> 
     381                                                <string>935 922 690 397 0 0 2560 1578 </string> 
    302382                                        </dict> 
    303383                                        <key>Module</key> 
     
    336416                                                                <string>{{0, 0}, {482, 0}}</string> 
    337417                                                                <key>RubberWindowFrame</key> 
    338                                                                 <string>495 496 690 397 0 0 1680 1028 </string> 
     418                                                                <string>935 922 690 397 0 0 2560 1578 </string> 
    339419                                                        </dict> 
    340420                                                        <key>Module</key> 
     
    344424                                                </dict> 
    345425                                                <dict> 
     426                                                        <key>BecomeActive</key> 
     427                                                        <true/> 
    346428                                                        <key>ContentConfiguration</key> 
    347429                                                        <dict> 
     
    356438                                                                <string>{{0, 5}, {482, 351}}</string> 
    357439                                                                <key>RubberWindowFrame</key> 
    358                                                                 <string>495 496 690 397 0 0 1680 1028 </string> 
     440                                                                <string>935 922 690 397 0 0 2560 1578 </string> 
    359441                                                        </dict> 
    360442                                                        <key>Module</key> 
     
    380462                        <key>TableOfContents</key> 
    381463                        <array> 
    382                                 <string>793A85750D53DDA5004463D4</string> 
     464                                <string>7942A4AD0D7603A40097D2DE</string> 
    383465                                <string>1CE0B1FE06471DED0097A5F4</string> 
    384                                 <string>793A85760D53DDA5004463D4</string> 
     466                                <string>7942A4AE0D7603A40097D2DE</string> 
    385467                                <string>1CE0B20306471E060097A5F4</string> 
    386468                                <string>1CE0B20506471E060097A5F4</string> 
     
    516598        <key>WindowOrderList</key> 
    517599        <array> 
     600                <string>79AC5C650D3FEA19008AE93A</string> 
     601                <string>7942A4B30D7603A40097D2DE</string> 
     602                <string>7942A4AF0D7603A40097D2DE</string> 
    518603                <string>/Users/wolf/code/trac/cocoa/mogenerator/mogenerator.xcodeproj</string> 
    519604        </array> 
    520605        <key>WindowString</key> 
    521         <string>495 496 690 397 0 0 1680 1028 </string> 
     606        <string>935 922 690 397 0 0 2560 1578 </string> 
    522607        <key>WindowToolsV3</key> 
    523608        <array> 
     
    549634                                                                <string>{{0, 0}, {500, 218}}</string> 
    550635                                                                <key>RubberWindowFrame</key> 
    551                                                                 <string>516 370 500 500 0 0 1680 1028 </string> 
     636                                                                <string>901 745 500 500 0 0 2560 1578 </string> 
    552637                                                        </dict> 
    553638                                                        <key>Module</key> 
     
    573658                                                                <string>{{0, 223}, {500, 236}}</string> 
    574659                                                                <key>RubberWindowFrame</key> 
    575                                                                 <string>516 370 500 500 0 0 1680 1028 </string> 
     660                                                                <string>901 745 500 500 0 0 2560 1578 </string> 
    576661                                                        </dict> 
    577662                                                        <key>Module</key> 
     
    596681                        <array> 
    597682                                <string>79AC5C650D3FEA19008AE93A</string> 
    598                                 <string>79AC5C660D3FEA19008AE93A</string> 
     683                                <string>7942A4B90D7603A40097D2DE</string> 
    599684                                <string>1CD0528F0623707200166675</string> 
    600685                                <string>XCMainBuildResultsModuleGUID</string> 
     
    603688                        <string>xcode.toolbar.config.buildV3</string> 
    604689                        <key>WindowString</key> 
    605                         <string>516 370 500 500 0 0 1680 1028 </string> 
     690                        <string>901 745 500 500 0 0 2560 1578 </string> 
    606691                        <key>WindowToolGUID</key> 
    607692                        <string>79AC5C650D3FEA19008AE93A</string> 
  • trunk/cocoa/mogenerator/mogenerator.xcodeproj/wolf.pbxuser

    r289 r294  
    7474                                ); 
    7575                        }; 
    76                         PBXPerProjectTemplateStateSaveDate = 223599997; 
    77                         PBXWorkspaceStateSaveDate = 223599997; 
     76                        PBXPerProjectTemplateStateSaveDate = 225834547; 
     77                        PBXWorkspaceStateSaveDate = 225834547; 
     78                }; 
     79                perUserProjectItems = { 
     80                        7942A4B10D7603A40097D2DE /* PBXTextBookmark */ = 7942A4B10D7603A40097D2DE /* PBXTextBookmark */; 
     81                        7942A4B20D7603A40097D2DE /* PBXTextBookmark */ = 7942A4B20D7603A40097D2DE /* PBXTextBookmark */; 
     82                        7942A4B50D7603A40097D2DE /* PBXTextBookmark */ = 7942A4B50D7603A40097D2DE /* PBXTextBookmark */; 
     83                        7942A4B70D7603A40097D2DE /* PBXTextBookmark */ = 7942A4B70D7603A40097D2DE /* PBXTextBookmark */; 
    7884                }; 
    7985                sourceControlManager = 79D2BF0B0ACFAE0700F3F141 /* Source Control */; 
     
    8389        08FB7796FE84155DC02AAC07 /* mogenerator.m */ = { 
    8490                uiCtxt = { 
    85                         sepNavIntBoundsRect = "{{0, 0}, {1274, 5670}}"; 
    86                         sepNavSelRange = "{0, 0}"; 
    87                         sepNavVisRange = "{0, 1657}"; 
     91                        sepNavIntBoundsRect = "{{0, 0}, {1037, 6048}}"; 
     92                        sepNavSelRange = "{3485, 0}"; 
     93                        sepNavVisRange = "{2598, 1676}"; 
    8894                        sepNavVisRect = "{{0, 0}, {1057, 777}}"; 
    8995                        sepNavWindowFrame = "{{542, 178}, {1096, 835}}"; 
     96                }; 
     97        }; 
     98        7942A4B10D7603A40097D2DE /* PBXTextBookmark */ = { 
     99                isa = PBXTextBookmark; 
     100                fRef = 08FB7796FE84155DC02AAC07 /* mogenerator.m */; 
     101                name = "mogenerator.m: 78"; 
     102                rLen = 22; 
     103                rLoc = 2519; 
     104                rType = 0; 
     105                vrLen = 1391; 
     106                vrLoc = 2155; 
     107        }; 
     108        7942A4B20D7603A40097D2DE /* PBXTextBookmark */ = { 
     109                isa = PBXTextBookmark; 
     110                fRef = 08FB7796FE84155DC02AAC07 /* mogenerator.m */; 
     111                name = "mogenerator.m: 119"; 
     112                rLen = 0; 
     113                rLoc = 3485; 
     114                rType = 0; 
     115                vrLen = 1676; 
     116                vrLoc = 2598; 
     117        }; 
     118        7942A4B50D7603A40097D2DE /* PBXTextBookmark */ = { 
     119                isa = PBXTextBookmark; 
     120                fRef = 7942A4B60D7603A40097D2DE /* NSAttributeDescription.h */; 
     121                rLen = 0; 
     122                rLoc = 9223372036854775807; 
     123                rType = 0; 
     124        }; 
     125        7942A4B60D7603A40097D2DE /* NSAttributeDescription.h */ = { 
     126                isa = PBXFileReference; 
     127                lastKnownFileType = sourcecode.c.h; 
     128                name = NSAttributeDescription.h; 
     129                path = /System/Library/Frameworks/CoreData.framework/Versions/A/Headers/NSAttributeDescription.h; 
     130                sourceTree = "<absolute>"; 
     131        }; 
     132        7942A4B70D7603A40097D2DE /* PBXTextBookmark */ = { 
     133                isa = PBXTextBookmark; 
     134                fRef = 7942A4B80D7603A40097D2DE /* NSAttributeDescription.h */; 
     135                name = "NSAttributeDescription.h: 31"; 
     136                rLen = 28; 
     137                rLoc = 989; 
     138                rType = 0; 
     139                vrLen = 1912; 
     140                vrLoc = 0; 
     141        }; 
     142        7942A4B80D7603A40097D2DE /* NSAttributeDescription.h */ = { 
     143                isa = PBXFileReference; 
     144                name = NSAttributeDescription.h; 
     145                path = /System/Library/Frameworks/CoreData.framework/Versions/A/Headers/NSAttributeDescription.h; 
     146                sourceTree = "<absolute>"; 
     147                uiCtxt = { 
     148                        sepNavIntBoundsRect = "{{0, 0}, {1334, 1176}}"; 
     149                        sepNavSelRange = "{989, 28}"; 
     150                        sepNavVisRange = "{0, 1912}"; 
     151                        sepNavWindowFrame = "{{107, 592}, {1035, 897}}"; 
    90152                }; 
    91153        }; 
  • trunk/cocoa/mogenerator/templates/machine.h.motemplate

    r282 r294  
    1414<$foreach Attribute noninheritedAttributes do$> 
    1515<$if Attribute.hasDefinedAttributeType$> 
    16 - (<$Attribute.attributeValueClassName$>*)<$Attribute.name$>; 
    17 - (void)set<$Attribute.name.initialCapitalString$>:(<$Attribute.attributeValueClassName$>*)value_; 
     16- (<$Attribute.objectAttributeType$>*)<$Attribute.name$>; 
     17- (void)set<$Attribute.name.initialCapitalString$>:(<$Attribute.objectAttributeType$>*)value_; 
    1818#if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 
    19 @property (retain) <$Attribute.attributeValueClassName$> *<$Attribute.name$>; 
     19@property (retain) <$Attribute.objectAttributeType$> *<$Attribute.name$>; 
    2020#endif 
    2121<$if Attribute.hasScalarAttributeType$> 
  • trunk/cocoa/mogenerator/templates/machine.m.motemplate

    r282 r294  
    1313<$if Attribute.hasDefinedAttributeType$> 
    1414 
    15 - (<$Attribute.attributeValueClassName$>*)<$Attribute.name$> { 
     15- (<$Attribute.objectAttributeType$>*)<$Attribute.name$> { 
    1616        [self willAccessValueForKey:@"<$Attribute.name$>"]; 
    17         <$Attribute.attributeValueClassName$> *result = [self primitiveValueForKey:@"<$Attribute.name$>"]; 
     17        <$Attribute.objectAttributeType$> *result = [self primitiveValueForKey:@"<$Attribute.name$>"]; 
    1818        [self didAccessValueForKey:@"<$Attribute.name$>"]; 
    1919        return result; 
    2020} 
    2121 
    22 - (void)set<$Attribute.name.initialCapitalString$>:(<$Attribute.attributeValueClassName$>*)value_ { 
     22- (void)set<$Attribute.name.initialCapitalString$>:(<$Attribute.objectAttributeType$>*)value_ { 
    2323        [self willChangeValueForKey:@"<$Attribute.name$>"]; 
    2424        [self setPrimitiveValue:value_ forKey:@"<$Attribute.name$>"];