Permalink
Browse files

Merge branch 'master' into develop

  • Loading branch information...
2 parents a962b03 + aa4d3d5 commit 0467af373c8b17ba628b331604049ca823a157fd @rentzsch committed Aug 31, 2012
Showing with 209 additions and 9,191 deletions.
  1. +1 −1 installer/make_installer.command
  2. +1 −0 mogenerator.h
  3. +23 −2 mogenerator.m
  4. +2 −4 mogenerator.xcodeproj/project.pbxproj
  5. BIN mogeneratorTestMule/English.lproj/InfoPlist.strings
  6. +0 −13 mogeneratorTestMule/English.lproj/MainMenu.nib/classes.nib
  7. +0 −24 mogeneratorTestMule/English.lproj/MainMenu.nib/info.nib
  8. +0 −6,059 mogeneratorTestMule/English.lproj/MainMenu.nib/keyedobjects.nib
  9. +0 −30 mogeneratorTestMule/Info.plist
  10. +0 −5 mogeneratorTestMule/MOs/ChildMO.h
  11. +0 −7 mogeneratorTestMule/MOs/ChildMO.m
  12. +0 −5 mogeneratorTestMule/MOs/ParentMO.h
  13. +0 −7 mogeneratorTestMule/MOs/ParentMO.m
  14. +0 −76 mogeneratorTestMule/MOs/_ChildMO.h
  15. +0 −101 mogeneratorTestMule/MOs/_ChildMO.m
  16. +0 −108 mogeneratorTestMule/MOs/_HumanMO.h
  17. +0 −196 mogeneratorTestMule/MOs/_HumanMO.m
  18. +0 −333 mogeneratorTestMule/MOs/_ParentMO.h
  19. +0 −347 mogeneratorTestMule/MOs/_ParentMO.m
  20. +0 −6 mogeneratorTestMule/MOs/include.m
  21. +0 −14 mogeneratorTestMule/main.m
  22. +0 −4 mogeneratorTestMule/mogenerate.command
  23. +0 −313 mogeneratorTestMule/mogeneratorTestMule.xcodeproj/project.pbxproj
  24. +0 −1,333 mogeneratorTestMule/mogeneratorTestMule.xcodeproj/wolf.mode1
  25. +0 −26 mogeneratorTestMule/mogeneratorTestMule_AppDelegate.h
  26. +0 −149 mogeneratorTestMule/mogeneratorTestMule_AppDelegate.m
  27. BIN mogeneratorTestMule/mogeneratorTestMule_DataModel.xcdatamodel/elements
  28. BIN mogeneratorTestMule/mogeneratorTestMule_DataModel.xcdatamodel/layout
  29. +0 −7 mogeneratorTestMule/mogeneratorTestMule_Prefix.pch
  30. +0 −14 mogeneratorTestMule/version.plist
  31. 0 {mogeneratorTestMule → templates}/MyBaseClass.h
  32. 0 {mogeneratorTestMule → templates}/MyBaseClass.m
  33. +8 −0 templates/machine.h.motemplate
  34. +7 −7 templates/machine.m.motemplate
  35. +1 −0 {mogeneratorTestMule/MOs → test}/HumanMO.h
  36. 0 {mogeneratorTestMule/MOs → test}/HumanMO.m
  37. +10 −0 test/MyBaseClass.h
  38. +13 −0 test/MyBaseClass.m
  39. +35 −0 test/Rakefile
  40. +7 −0 test/test-prefix.pch
  41. +101 −0 test/test.m
  42. BIN test/test.xcdatamodel/elements
  43. BIN test/test.xcdatamodel/layout
@@ -25,5 +25,5 @@ sed -e "s/MAJOR_VERSION/$MAJOR_VERSION/g" -e "s/MINOR_VERSION/$MINOR_VERSION/g"
sudo chown -R root 'build/root'
sudo chgrp -R admin 'build/root'
-/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -build -p "build/mogenerator-$VERSION.pkg" -f 'build/root' -i 'build/Info.plist' -d 'build/Description.plist' -ds
+/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -build -p "build/mogenerator-$VERSION.pkg" -f 'build/root' -i 'build/Info.plist' -d 'build/Description.plist' -ds
hdiutil create -srcfolder "build/mogenerator-$VERSION.pkg" -volname "mogenerator $VERSION" "build/mogenerator-$VERSION.dmg"
View
@@ -37,6 +37,7 @@
- (NSString*)objectAttributeClassName;
- (NSString*)objectAttributeType;
- (BOOL)hasTransformableAttributeType;
+- (BOOL)isReadonly;
@end
@interface NSRelationshipDescription (collectionClassName)
View
@@ -179,6 +179,16 @@ - (NSString *)_resolveKeyPathType:(NSString *)keyPath {
return [entity managedObjectClassName];
}
+// auxiliary function
+- (BOOL) bindingsArray:(NSArray *)bindings containsVariableNamed:(NSString *)name {
+ for (NSDictionary *dict in bindings) {
+ if ([[dict objectForKey:@"name"] isEqual:name]) {
+ return YES;
+ }
+ }
+ return NO;
+}
+
- (void)_processPredicate:(NSPredicate*)predicate_ bindings:(NSMutableArray*)bindings_ {
if (!predicate_) return;
@@ -209,11 +219,13 @@ - (void)_processPredicate:(NSPredicate*)predicate_ bindings:(NSMutableArray*)bin
type = [self _resolveKeyPathType:[lhs keyPath]];
}
type = [type stringByAppendingString:@"*"];
-
- [bindings_ addObject:[NSDictionary dictionaryWithObjectsAndKeys:
+ // make sure that no repeated variables are entered here.
+ if (![self bindingsArray:bindings_ containsVariableNamed:[rhs variable]]) {
+ [bindings_ addObject:[NSDictionary dictionaryWithObjectsAndKeys:
[rhs variable], @"name",
type, @"type",
nil]];
+ }
} break;
default:
assert(0 && "unknown NSExpression type");
@@ -356,6 +368,15 @@ - (NSString*)objectAttributeType {
- (BOOL)hasTransformableAttributeType {
return ([self attributeType] == NSTransformableAttributeType);
}
+
+- (BOOL)isReadonly {
+ NSString *readonlyUserinfoValue = [[self userInfo] objectForKey:@"mogenerator.readonly"];
+ if (readonlyUserinfoValue != nil) {
+ return YES;
+ }
+ return NO;
+}
+
@end
@implementation NSRelationshipDescription (collectionClassName)
@@ -467,7 +467,6 @@
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
- DEPLOYMENT_LOCATION = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
@@ -476,7 +475,6 @@
GCC_PREFIX_HEADER = mogenerator_Prefix.pch;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- INSTALL_PATH = "$(HOME)/bin";
OTHER_LDFLAGS = (
"-sectcreate",
__TEXT,
@@ -491,15 +489,13 @@
1DEB927608733DD40010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- DEPLOYMENT_LOCATION = NO;
DEPLOYMENT_POSTPROCESSING = NO;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = mogenerator_Prefix.pch;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- INSTALL_PATH = "$(HOME)/bin";
OTHER_LDFLAGS = (
"-sectcreate",
__TEXT,
@@ -515,6 +511,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx;
};
name = Debug;
@@ -523,6 +520,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx;
};
name = Release;
Binary file not shown.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 0467af3

Please sign in to comment.