aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
diff options
context:
space:
mode:
authorbamse16 <marius@marius.me.uk>2009-03-11 04:26:30 +0000
committerbamse16 <marius@marius.me.uk>2009-03-11 04:26:30 +0000
commit14e31698388f4472cedf62dbd4f60a5749de0306 (patch)
tree13cfb496637ae7cfabca806f9d2d7db0d05aea8f /Source/TableContent.m
parente8d8d6cc38cc92b7201806ed42db50a4c4b324ea (diff)
downloadsequelpro-14e31698388f4472cedf62dbd4f60a5749de0306.tar.gz
sequelpro-14e31698388f4472cedf62dbd4f60a5749de0306.tar.bz2
sequelpro-14e31698388f4472cedf62dbd4f60a5749de0306.zip
Small fixes clang complained about. Others will follow
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r--Source/TableContent.m13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 3443a73f..9548f191 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -1156,7 +1156,6 @@
- (BOOL)addRowToDB
{
NSArray *theColumns, *columnNames;
- NSMutableArray *fieldValues = [[NSMutableArray alloc] init];
NSMutableString *queryString;
NSString *query;
CMMCPResult *queryResult;
@@ -1166,7 +1165,6 @@
int i;
if ( !isEditingRow || currentlyEditingRow == -1) {
- [fieldValues release];
return YES;
}
@@ -1183,6 +1181,7 @@
theColumns = [tableDataInstance columns];
columnNames = [tableDataInstance columnNames];
+ NSMutableArray *fieldValues = [[NSMutableArray alloc] init];
// Get the field values
for ( i = 0 ; i < [columnNames count] ; i++ ) {
rowObject = [[filteredResult objectAtIndex:currentlyEditingRow] objectForKey:[columnNames objectAtIndex:i]];
@@ -1824,13 +1823,19 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn
if ( [tableColumnWidths objectForKey:database] == nil ) {
[tableColumnWidths setObject:[NSMutableDictionary dictionary] forKey:database];
} else {
- [tableColumnWidths setObject:[[tableColumnWidths objectForKey:database] mutableCopy] forKey:database];
+ //[NSMutableArray arrayWithArray:array]; vs [array mutableCopy];
+ //[tableColumnWidths setObject:[[tableColumnWidths objectForKey:database] mutableCopy] forKey:database];
+ [tableColumnWidths setObject:[NSMutableArray arrayWithArray:[tableColumnWidths objectForKey:database]] forKey:database];
+
}
// get table object
if ( [[tableColumnWidths objectForKey:database] objectForKey:table] == nil ) {
[[tableColumnWidths objectForKey:database] setObject:[NSMutableDictionary dictionary] forKey:table];
} else {
- [[tableColumnWidths objectForKey:database] setObject:[[[tableColumnWidths objectForKey:database] objectForKey:table] mutableCopy] forKey:table];
+ //[NSMutableArray arrayWithArray:array]; vs [array mutableCopy];
+ //[[tableColumnWidths objectForKey:database] setObject:[[[tableColumnWidths objectForKey:database] objectForKey:table] mutableCopy] forKey:table];
+ [[tableColumnWidths objectForKey:database] setObject:[NSMutableArray arrayWithArray:[[tableColumnWidths objectForKey:database] objectForKey:table]] forKey:table];
+
}
// save column size
[[[tableColumnWidths objectForKey:database] objectForKey:table] setObject:[NSNumber numberWithFloat:[[[aNotification userInfo] objectForKey:@"NSTableColumn"] width]] forKey:[[[aNotification userInfo] objectForKey:@"NSTableColumn"] identifier]];