Commits

Tuukka Norri committed 2798fcf

Bug fixes
- Fixed a bug in AuthenticationView.nib which caused some controls in the authentication panel not to be disabled during authentication. This happened because NSKVB requires key paths that begin with "is" to be referred to without it.
- Fixed a bug in BXSynchronizedArrayController which caused garbage to be left into an ivar (namely the one that should contain the entity description) if the database URI got changed during the connection process.

Comments (0)

Files changed (2)

BaseTenAppKit/English.lproj/AuthenticationView.nib/keyedobjects.nib

Binary file modified.

BaseTenAppKit/Sources/BXSynchronizedArrayController.m

 	}	
 }
 
-- (void) gotDatabaseURI: (NSNotification *) notification
-{	
-	BXDatabaseContext* ctx = [notification object];
-	ExpectV (ctx == databaseContext)
-
-	[[ctx notificationCenter] removeObserver: self name: kBXGotDatabaseURINotification object: ctx];
-	[self prepareEntity];
-}
-
 /**
  * \brief Set the database context.
  * \see #setFetchesOnConnect:
         databaseContext = [ctx retain];
 		
 		if (nil != databaseContext)
-		{
-            nc = [databaseContext notificationCenter];
-			if (mFetchesOnConnect)
-				[nc addObserver: self selector: @selector (endConnecting:) name: kBXConnectionSuccessfulNotification object: databaseContext];
-            
+		{            
             //Also set the entity description, since the database URI has changed.
 			if (nil != [self tableName] && [databaseContext canGiveEntities])
 				[self prepareEntity];
 
-			[nc addObserver: self selector: @selector (gotDatabaseURI:) name: kBXGotDatabaseURINotification object: databaseContext];
+			[[databaseContext notificationCenter] addObserver: self selector: @selector (endConnecting:) name: kBXConnectionSuccessfulNotification object: databaseContext];
 		}
     }
 }