[Tcladdressbook-commits] Source TclAddressBookUtils.c,1.4,1.5
Status: Alpha
Brought to you by:
bdesgraupes
|
From: <bde...@us...> - 2003-12-09 09:06:12
|
Update of /cvsroot/tcladdressbook/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv16114/Source
Modified Files:
TclAddressBookUtils.c
Log Message:
CreateCmd does not save anymore.
Index: TclAddressBookUtils.c
===================================================================
RCS file: /cvsroot/tcladdressbook/Source/TclAddressBookUtils.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- TclAddressBookUtils.c 9 Dec 2003 08:08:20 -0000 1.4
+++ TclAddressBookUtils.c 9 Dec 2003 09:06:08 -0000 1.5
@@ -1,7 +1,7 @@
/*
* File : "TclAddressBookUtils.c"
* Created: 2003-12-05 10:08:03
- * Last modification: 2003-12-09 08:50:24
+ * Last modification: 2003-12-09 09:19:04
* Author: Bernard Desgraupes
* e-mail: <bde...@ea...>
*
@@ -335,7 +335,7 @@
Boolean TclAB_SetValue(Tcl_Interp *interp, ABRecordRef theRecord, CFStringRef inProperty,
CONST84 char * inValue, ABPropertyType inPropType)
{
- CFStringRef theValue, subLabel, subKey, subValue;
+ CFStringRef theValue = NULL, subLabel, subKey, subValue;
ABMutableMultiValueRef multiValue;
CFMutableDictionaryRef theDict;
int j, k, listLen, subListLen, length, result = true;
@@ -894,18 +894,12 @@
Tcl_AppendStringsToObj(resultPtr, "Couldn't add the new record to the Address Book", (char *) NULL);
result = TCL_ERROR;
} else {
- // Save the Address Book
- if ( !ABSave(ab) ) {
- Tcl_AppendStringsToObj(resultPtr, "Couldn't save the Address Book", (char *) NULL);
- result = TCL_ERROR;
- } else {
- // Retrieve the UID for the newly created record
- uniqueId = ABRecordCopyUniqueId(theRecord);
- CFStringGetCString(uniqueId, theUID, sizeof(theUID), theEncoding);
- CFRelease(uniqueId);
- Tcl_AppendStringsToObj(resultPtr, theUID, (char *) NULL);
- result = TCL_OK;
- }
+ // Retrieve the UID for the newly created record
+ uniqueId = ABRecordCopyUniqueId(theRecord);
+ CFStringGetCString(uniqueId, theUID, sizeof(theUID), theEncoding);
+ CFRelease(uniqueId);
+ Tcl_AppendStringsToObj(resultPtr, theUID, (char *) NULL);
+ result = TCL_OK;
}
DONE:
|