From 127401a46406d9c38702321cc9ed2591957435aa Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 18 Sep 2006 15:28:15 +0000 Subject: [PATCH] Monotone-Parent: 25fed2157caf8da35ae90d48f9cc9413a71e94ea Monotone-Revision: 3eebff6c3d23fc58587f9e610046a48169abeb91 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-09-18T15:28:15 Monotone-Branch: ca.inverse.sogo --- UI/Contacts/UIxContactEditor.m | 53 +++++----------------------------- 1 file changed, 7 insertions(+), 46 deletions(-) diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index 979131dab..8a56da7db 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -442,6 +442,7 @@ - (id) saveAction { id contact; + id result; contact = [self clientObject]; card = [contact vCard]; @@ -449,54 +450,14 @@ { [self _saveSnapshot]; [contact save]; + result = self; } -// NSException *ex; -// NSString *uri; -// NSDictionary *record; -// NSMutableDictionary *newRecord; - -// if ([[self clientObject] -// respondsToSelector: @selector (saveContentString:)]) -// { -// if (contentString) -// { -// record = [contentString propertyList]; -// if (record) -// { -// newRecord = [[record mutableCopy] autorelease]; -// [self saveValuesIntoRecord: newRecord]; -// ex = [[self clientObject] saved]; -// if (ex) -// { -// [self setErrorText: [ex reason]]; + else + result = [NSException exceptionWithHTTPStatus: 400 /* Bad Request */ + reason: @"method cannot be invoked on " + @"the specified object"]; -// return self; -// } -// else -// { -// uri = [self viewActionName]; -// if ([uri length] <= 0) -// uri = @".."; - -// return [self redirectToLocation: [self _completeURIForMethod: uri]]; -// } -// } -// else -// { -// [self setErrorText: @"Invalid property list data ..."]; // localize -// return self; -// } -// } -// else -// { -// [self setErrorText: @"Missing object content!"]; // localize -// return self; -// } -// } -// else - return [NSException exceptionWithHTTPStatus: 400 /* Bad Request */ - reason: @"method cannot be invoked on " - @"the specified object"]; + return result; } - (id) writeAction