Tuukka Norri avatar Tuukka Norri committed b04c080

BaseTenAssistant builds again

Comments (0)

Files changed (5)

BaseTen.xcodeproj/project.pbxproj

 		5329E7F9119F48BC000EC6ED /* pcre.h in Headers */ = {isa = PBXBuildFile; fileRef = 53C4E26B1194C757003FB842 /* pcre.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		5331CB5B0DEDA843003AF2A9 /* BXPGReconnectionRecoveryAttempter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5331CB570DEDA843003AF2A9 /* BXPGReconnectionRecoveryAttempter.h */; };
 		5331CB5C0DEDA843003AF2A9 /* BXPGReconnectionRecoveryAttempter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5331CB580DEDA843003AF2A9 /* BXPGReconnectionRecoveryAttempter.m */; };
-		5334324511A881F200B71D24 /* BXConnectionMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 5334324311A881F200B71D24 /* BXConnectionMonitor.h */; };
+		5334324511A881F200B71D24 /* BXConnectionMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 5334324311A881F200B71D24 /* BXConnectionMonitor.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		5334324611A881F200B71D24 /* BXConnectionMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 5334324411A881F200B71D24 /* BXConnectionMonitor.m */; };
 		53372E2A119AD74D0006F0A3 /* BXHostResolver.m in Sources */ = {isa = PBXBuildFile; fileRef = 53372E29119AD74D0006F0A3 /* BXHostResolver.m */; };
 		53372E2C119AD77C0006F0A3 /* BXHostResolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 53372E2B119AD77C0006F0A3 /* BXHostResolver.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		5348B84A0F575EE100B2655E /* BXDatabaseObjectModelStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 535736CA0F333CCD00DB3D0B /* BXDatabaseObjectModelStorage.m */; };
 		534A14AF0F0FBBE6002A9F68 /* BaseTenModifications.sql.m4 in Resources */ = {isa = PBXBuildFile; fileRef = 534A14AE0F0FBBE6002A9F68 /* BaseTenModifications.sql.m4 */; };
 		534BE4680F34F7130098951C /* BXForeignKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 5328FBD40C4580CD006DE171 /* BXForeignKey.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		534E3C7D11A77088002D49C8 /* BXSocketReachabilityObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 534E3C7B11A77088002D49C8 /* BXSocketReachabilityObserver.h */; };
+		534E3C7D11A77088002D49C8 /* BXSocketReachabilityObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 534E3C7B11A77088002D49C8 /* BXSocketReachabilityObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		534E3C7E11A77088002D49C8 /* BXSocketReachabilityObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 534E3C7C11A77088002D49C8 /* BXSocketReachabilityObserver.m */; };
 		5350CC380EFBE66500EBC328 /* PGTSCollections.h in Headers */ = {isa = PBXBuildFile; fileRef = 5350CC360EFBE66500EBC328 /* PGTSCollections.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		5350CC390EFBE66500EBC328 /* PGTSCollections.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5350CC370EFBE66500EBC328 /* PGTSCollections.mm */; };

BaseTenAssistant/Sources/BXAController.h

 @class RKRegex;
 
 
-@interface BXAController : NSObject 
+@interface BXAController : NSObject <NSNetServiceBrowserDelegate, NSNetServiceDelegate>
 {
 	MKCPolishedCornerView* mCornerView;
 	NSButtonCell* mInspectorButtonCell;

BaseTenAssistant/Sources/BXAController.m

 		BOOL currentIsView = NO;
 		NSArray* selectedEntities = [mEntities selectedObjects];
 		if (0 < [selectedEntities count])
-			currentIsView = [[[selectedEntities objectAtIndex: 0] value]isView];
+		{
+			BXEntityDescription *entity = (id) [[selectedEntities objectAtIndex: 0] value];
+			currentIsView = [entity isView];
+		}
 		
 		NSView* scrollView = [[mAttributeTable superview] superview];
 		NSRect frame = [scrollView frame];			
 	if (-1 != rowIndex)
 	{
 		retval = YES;
-		BXEntityDescription* entity = [[[mEntities arrangedObjects] objectAtIndex: rowIndex] value];
+		BXEntityDescription* entity = (id) [[[mEntities arrangedObjects] objectAtIndex: rowIndex] value];
 		if ([entity isView])
 		{
 			if (! [[entity primaryKeyFields] count])
 		{
 			query = @"CREATE TEMPORARY TABLE baseten_view_pkey AS SELECT * FROM baseten.view_pkey";
 			res = [connection executeQuery: query];
-			BXAssertLog ([res querySucceeded], [[res error] description]);
+			BXAssertLog ([res querySucceeded], @"%@", [[res error] description]);
 
 			query =
 			@"CREATE TEMPORARY TABLE baseten_enabled_oids AS "
 			@" SELECT c.oid FROM pg_class c WHERE baseten.is_enabled (c.oid) = true";
 			res = [connection executeQuery: query];
-			BXAssertLog ([res querySucceeded], [[res error] description]);
+			BXAssertLog ([res querySucceeded], @"%@", [[res error] description]);
 		}
 		else if (NSOrderedAscending != [version compare: [NSDecimalNumber decimalNumberWithString: @"0.922"]])
 		{
 			query = @"CREATE TEMPORARY TABLE baseten_view_pkey AS SELECT * FROM baseten.view_pkey";
 			res = [connection executeQuery: query];
-			BXAssertLog ([res querySucceeded], [[res error] description]);
+			BXAssertLog ([res querySucceeded], @"%@", [[res error] description]);
 
 			query = 
 			@"CREATE TEMPORARY TABLE baseten_enabled_oids AS "
 			@" SELECT relid AS oid FROM baseten.enabled_relation";
 			res = [connection executeQuery: query];			
-			BXAssertLog ([res querySucceeded], [[res error] description]);
+			BXAssertLog ([res querySucceeded], @"%@", [[res error] description]);
 		}
 		else
 		{
 			query = @"CREATE TEMPORARY TABLE baseten_view_pkey AS SELECT * FROM baseten.viewprimarykey";
 			res = [connection executeQuery: query];
-			BXAssertLog ([res querySucceeded], [[res error] description]);
+			BXAssertLog ([res querySucceeded], @"%@", [[res error] description]);
 
 			query = 
 			@"CREATE TEMPORARY TABLE baseten_enabled_oids AS "
 			@" SELECT oid FROM pg_class WHERE baseten.isobservingcompatible (oid) = true";
 			res = [connection executeQuery: query];			
-			BXAssertLog ([res querySucceeded], [[res error] description]);
+			BXAssertLog ([res querySucceeded], @"%@", [[res error] description]);
 		}
 	}
 	
 	NSArray *arrangedObjects = [mEntities arrangedObjects];
 	for (id pair in arrangedObjects)
 	{
-		if ([pair value] == entity)
+		if ((id) [pair value] == entity)
 		{
 			[mEntities setSelectedObjects: [NSArray arrayWithObject: pair]];
 			break;
 	else
 	{
 		for (id pair in [mEntities arrangedObjects])
-			[[pair value] setEnabled: NO];
+		{
+			BXEntityDescription *entity = (id) [pair value];
+			[entity setEnabled: NO];
+		}
 
 		[self reload: nil];
 		[self checkBaseTenSchema: NULL];

BaseTenAssistant/Sources/BXAImportController.m

 #import "MKCPolishedCornerView.h"
 #import "MKCEventPassingTextField.h"
 #import "Additions.h"
-#import <BaseTen/PGTSHOM.h>
+#import <BaseTen/BXHOM.h>
 #import <BaseTen/BXDatabaseContextPrivate.h>
 #import <BaseTen/PGTSConnection.h>
 #import <BaseTen/PGTSResultSet.h>
 - (void) import: (BOOL) modifyDatabase usingSheet: (BOOL) useSheet
 {
 	BOOL shouldContinue = YES;
-	NSArray* importedEntities = [[mEntities arrangedObjects] PGTSSelectFunction: &ShouldImport];
+	NSArray* importedEntities = [[mEntities arrangedObjects] BX_SelectFunction: &ShouldImport];
 
 	if (! mEntityImporter)
 	{

BaseTenAssistant/Sources/BXAInspectorPanelController.m

 
 - (IBAction) propertyDoubleClick: (id) sender
 {
-	BXPropertyDescription *property = [[[mPropertyController selectedObjects] lastObject] value];
+	BXPropertyDescription *property = (id) [[[mPropertyController selectedObjects] lastObject] value];
 	if (property && [property propertyKind] == kBXPropertyKindRelationship)
 		[self displayProperty: [(BXRelationshipDescription *) property inverseRelationship]];
 }
 	NSArray *arrangedObjects = [mPropertyController arrangedObjects];
 	for (id pair in arrangedObjects)
 	{
-		if ([pair value] == property)
+		if ((id) [pair value] == property)
 		{
 			[mPropertyController setSelectedObjects: [NSArray arrayWithObject: pair]];
 			break;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.