From: Michael J. Rubinsky Date: Tue, 31 Aug 2010 16:40:13 +0000 (-0400) Subject: NSDictionary objects cannot contain nil objects. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b143b610139034e7037520d4be1fe0e1f2d296d3;p=horde.git NSDictionary objects cannot contain nil objects. --- diff --git a/ApertureToAnselExportPlugin/ApertureToAnselExportPlugin.m b/ApertureToAnselExportPlugin/ApertureToAnselExportPlugin.m index cef3bb41b..13342844f 100644 --- a/ApertureToAnselExportPlugin/ApertureToAnselExportPlugin.m +++ b/ApertureToAnselExportPlugin/ApertureToAnselExportPlugin.m @@ -758,11 +758,6 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn didEndSelector: nil contextInfo: nil]; - // Populate the version popup - //[mAnselVersion addItemWithTitle:@"1.x"]; - //[mAnselVersion addItemWithTitle:@"2.x"]; - //[mAnselVersion setTitle:@"1.x"]; - // Make sure these are cleared. [mServerSheetHostURL setStringValue: @""]; [mServerSheetUsername setStringValue: @""]; @@ -790,11 +785,16 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn [self setStatusText: @"Connecting..."]; [spinner startAnimation: self]; + // NSDictionary objects cannot contain nil objects + NSNumber *apiversion = [_currentServer objectForKey: TURAnselServerVersionKey]; + if (apiversion == nil) { + apiversion = [NSNumber numberWithInt: 1]; + } NSDictionary *p = [[NSDictionary alloc] initWithObjects: [NSArray arrayWithObjects: [_currentServer objectForKey:TURAnselServerEndpointKey], [_currentServer objectForKey:TURAnselServerUsernameKey], [_currentServer objectForKey:TURAnselServerPasswordKey], - [_currentServer objectForKey:TURAnselServerVersionKey], + apiversion, nil] forKeys: [NSArray arrayWithObjects:TURAnselServerEndpointKey, TURAnselServerUsernameKey, TURAnselServerPasswordKey, TURAnselServerVersionKey, nil]]; // Create our controller