Permalink
Browse files

shitty commit

  • Loading branch information...
1 parent 2ca1387 commit 74503fdfa85786bedb55e9f6c59b435f0e0078fe @mralexgray committed Oct 7, 2012
@@ -10,10 +10,11 @@
@interface ApplicationController : NSObject <NSTableViewDataSource>
-@property (nonatomic, retain) NSMA *mutObjects;
+@property (nonatomic, strong) NSMA *mutObjects;
-@property (assign) IBOutlet CAListView *caListView;
-@property (assign) IBOutlet NSArrayController *arrayController;
+@property (strong) IBOutlet CAListView *caListView;
+@property (strong) IBOutlet NSArrayController *arrayController;
@property (assign) IBOutlet NSTableView *tableView;
+@property (assign) IBOutlet NSButton *reload;
@end
@@ -17,18 +17,23 @@ @implementation ApplicationController
- (id)init
{
if (![super init]) return nil;
-
+ [self.reload setTarget:caListView];
+ [self.reload setAction:@selector(repositionObjects)];
- NSA *colors = [NSColor colorsInFrameworkListNamed:[(NSColorList*)[[NSColorList availableColorLists]randomElement]name]];
+ NSColorList *colors = [[NSColorList availableColorLists]randomElement];
// Add some objects
+
mutObjects = [[NSArray arrayFrom:0 To:8] arrayUsingBlock:^id(id obj) {
SampleObject* object;
object = [SampleObject new];
- object.name = [NSString randomWords:1];
- object.description = [NSString randomWords:3];
- object.color = colors.randomElement;
- return object;
+ NSS *x = [[colors allKeys] randomElement];
+ object.name = x;
+ object.description = [[colors colorWithKey:x]nameOfColor];
+ object.color = [colors colorWithKey:x];
+// return object.copy;
}].mutableCopy;
+ // [mutObjects setAssociatedValue:colors forKey:@"colorlist"];
+
return self;
}
@@ -40,7 +45,7 @@ - (void)awakeFromNib
[caListView bind:@"objects" toObject:arrayController withKeyPath:@"arrangedObjects" options:nil];
// and to each key of each instance of SampleObject
[caListView bind:@"objectsKeyChanged" toObject:[SampleObject sharedInstance] withKeyPath:@"keyChanged" options:nil];
-
+// [[SampleObject sharedInstance] addObserver:caListView forKeyPath:@"keyChanged" options:0 context:nil];
// Setup drag and drop our tableview
[tableView registerForDraggedTypes:[NSArray arrayWithObject:SampleObjectDataType] ];
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 44;
+ objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
@@ -13,7 +13,10 @@
3D8175AF0DBF211A00B68295 /* CAListView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8175AE0DBF211A00B68295 /* CAListView.m */; };
3D81766E0DBF313200B68295 /* ColorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D81766D0DBF313200B68295 /* ColorCell.m */; };
3D817D1A0DBFA1AC00B68295 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D817D190DBFA1AC00B68295 /* QuartzCore.framework */; };
- 7B662AFD16209B71003D5EE0 /* AtoZ.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B662AFB16209B41003D5EE0 /* AtoZ.framework */; };
+ 7B0F17101621143D00E028FC /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B0F170F1621143D00E028FC /* Cocoa.framework */; };
+ 7B0F1727162114DD00E028FC /* AtoZ.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B0F1726162114DD00E028FC /* AtoZ.framework */; };
+ 7B0F172A1621155F00E028FC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B0F17291621155F00E028FC /* QuartzCore.framework */; };
+ 7B0F172B1621157F00E028FC /* AtoZ.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B0F1726162114DD00E028FC /* AtoZ.framework */; };
8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
@@ -39,19 +42,32 @@
3D81766C0DBF313200B68295 /* ColorCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorCell.h; sourceTree = "<group>"; };
3D81766D0DBF313200B68295 /* ColorCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColorCell.m; sourceTree = "<group>"; };
3D817D190DBFA1AC00B68295 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
- 7B662AFB16209B41003D5EE0 /* AtoZ.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AtoZ.framework; path = /Library/Frameworks/AtoZ.framework; sourceTree = "<absolute>"; };
+ 7B0F170D1621143D00E028FC /* SimplerBindings.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimplerBindings.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7B0F170F1621143D00E028FC /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ 7B0F1726162114DD00E028FC /* AtoZ.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AtoZ.framework; path = /Library/Frameworks/AtoZ.framework; sourceTree = "<absolute>"; };
+ 7B0F17291621155F00E028FC /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* CoreAnimationBindings.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CoreAnimationBindings.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
+ 7B0F170A1621143D00E028FC /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7B0F172B1621157F00E028FC /* AtoZ.framework in Frameworks */,
+ 7B0F172A1621155F00E028FC /* QuartzCore.framework in Frameworks */,
+ 7B0F17101621143D00E028FC /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8D11072E0486CEB800E47090 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
3D817D1A0DBFA1AC00B68295 /* QuartzCore.framework in Frameworks */,
- 7B662AFD16209B71003D5EE0 /* AtoZ.framework in Frameworks */,
+ 7B0F1727162114DD00E028FC /* AtoZ.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -61,6 +77,7 @@
080E96DDFE201D6D7F000001 /* Views */ = {
isa = PBXGroup;
children = (
+ 29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
3D8175AD0DBF211A00B68295 /* CAListView.h */,
3D8175AE0DBF211A00B68295 /* CAListView.m */,
3D81766C0DBF313200B68295 /* ColorCell.h */,
@@ -91,15 +108,16 @@
isa = PBXGroup;
children = (
8D1107320486CEB800E47090 /* CoreAnimationBindings.app */,
+ 7B0F170D1621143D00E028FC /* SimplerBindings.app */,
);
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* CoreAnimationBindings */ = {
isa = PBXGroup;
children = (
+ 7B0F17291621155F00E028FC /* QuartzCore.framework */,
7B662AF9162098D0003D5EE0 /* Controllers */,
- 29B97323FDCFA39411CA2CEA /* Frameworks */,
7B662AFA162098E3003D5EE0 /* Models */,
19C28FACFE9D520D11CA2CBB /* Products */,
29B97317FDCFA39411CA2CEA /* Resources */,
@@ -111,25 +129,27 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
32CA4F630368D1EE00C91783 /* CoreAnimationBindings_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
3D2342190DC084890041E727 /* gradient2.png */,
8D1107310486CEB800E47090 /* Info.plist */,
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
- 29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
);
path = Resources;
sourceTree = SOURCE_ROOT;
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
- 7B662AFB16209B41003D5EE0 /* AtoZ.framework */,
+ 7B0F1726162114DD00E028FC /* AtoZ.framework */,
3D817D190DBFA1AC00B68295 /* QuartzCore.framework */,
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+ 7B0F170F1621143D00E028FC /* Cocoa.framework */,
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
);
name = Frameworks;
+ path = ..;
sourceTree = "<group>";
};
7B662AF9162098D0003D5EE0 /* Controllers */ = {
@@ -153,6 +173,23 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
+ 7B0F170C1621143D00E028FC /* SimplerBindings */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 7B0F17231621143E00E028FC /* Build configuration list for PBXNativeTarget "SimplerBindings" */;
+ buildPhases = (
+ 7B0F17091621143D00E028FC /* Sources */,
+ 7B0F170A1621143D00E028FC /* Frameworks */,
+ 7B0F170B1621143D00E028FC /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = SimplerBindings;
+ productName = SimplerBindings;
+ productReference = 7B0F170D1621143D00E028FC /* SimplerBindings.app */;
+ productType = "com.apple.product-type.application";
+ };
8D1107260486CEB800E47090 /* CoreAnimationBindings */ = {
isa = PBXNativeTarget;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "CoreAnimationBindings" */;
@@ -176,8 +213,11 @@
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0450;
+ };
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CoreAnimationBindings" */;
- compatibilityVersion = "Xcode 3.0";
+ compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
@@ -188,11 +228,19 @@
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* CoreAnimationBindings */,
+ 7B0F170C1621143D00E028FC /* SimplerBindings */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
+ 7B0F170B1621143D00E028FC /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8D1107290486CEB800E47090 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -206,6 +254,13 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
+ 7B0F17091621143D00E028FC /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
8D11072C0486CEB800E47090 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -235,18 +290,77 @@
29B97319FDCFA39411CA2CEA /* English */,
);
name = MainMenu.nib;
+ path = ../Resources;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
+ 7B0F17241621143E00E028FC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COMBINE_HIDPI_IMAGES = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "SimplerBindings/SimplerBindings-Prefix.pch";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ INFOPLIST_FILE = "SimplerBindings/SimplerBindings-Info.plist";
+ MACOSX_DEPLOYMENT_TARGET = 10.8;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = "";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 7B0F17251621143E00E028FC /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COMBINE_HIDPI_IMAGES = YES;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "SimplerBindings/SimplerBindings-Prefix.pch";
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ INFOPLIST_FILE = "SimplerBindings/SimplerBindings-Info.plist";
+ MACOSX_DEPLOYMENT_TARGET = 10.8;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = "";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
+ COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -267,6 +381,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
+ COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -285,30 +400,38 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
- ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_64)";
+ ONLY_ACTIVE_ARCH = YES;
SDKROOT = "";
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)";
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
- ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_64)";
+ ONLY_ACTIVE_ARCH = YES;
SDKROOT = "";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
+ 7B0F17231621143E00E028FC /* Build configuration list for PBXNativeTarget "SimplerBindings" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7B0F17241621143E00E028FC /* Debug */,
+ 7B0F17251621143E00E028FC /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "CoreAnimationBindings" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@@ -19,6 +19,7 @@
+ (NSString*)lastModifiedKey;
+ (void)setLastModifiedKey:(NSString*)key forInstance:(id)object;
+@property (copy) NSString* uniqueID;
@property (copy) NSString* name;
@property (copy) NSString* description;
@@ -10,10 +10,12 @@ @implementation SampleObject
- (id)init
{
- if (![super init]) return nil;
+// if (![super init]) return nil;
+ self = self ?self : [super init];
name = [NSString randomWords:1];
description = [NSString randomWords:3];
color = RANDOMCOLOR;
+ _uniqueID = [NSString newUniqueIdentifier];
return self;
}
Oops, something went wrong.

0 comments on commit 74503fd

Please sign in to comment.