aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPUserManager.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPUserManager.m')
-rw-r--r--Source/SPUserManager.m13
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index 655aa460..a320a8c6 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -482,26 +482,33 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn";
*/
- (IBAction)doApply:(id)sender
{
- NSError *error = nil;
errorsString = [[NSMutableString alloc] init];
// Change the first responder to end editing in any field
[[self window] makeFirstResponder:self];
isSaving = YES;
+
+ NSError *error = nil;
[[self managedObjectContext] save:&error];
isSaving = NO;
- if (error != nil) [errorsString appendString:[error localizedDescription]];
+ if (error) [errorsString appendString:[error localizedDescription]];
[[self connection] queryString:@"FLUSH PRIVILEGES"];
// Display any errors
if ([errorsString length]) {
[errorsTextView setString:errorsString];
- [NSApp beginSheet:errorsSheet modalForWindow:[NSApp keyWindow] modalDelegate:nil didEndSelector:NULL contextInfo:nil];
+
+ [NSApp beginSheet:errorsSheet
+ modalForWindow:[NSApp keyWindow]
+ modalDelegate:nil
+ didEndSelector:NULL
+ contextInfo:nil];
+
[errorsString release];
return;