From adf5d76a879d7e5474cf18843381f1dc553948a2 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 27 Sep 2010 09:21:14 +0000 Subject: =?UTF-8?q?=E2=80=A2=20made=20SPCopyTable=20more=20independent=20a?= =?UTF-8?q?gainst=20missing=20'tableStorage'=20object?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPCopyTable.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m index 8c6f6525..e53e714a 100644 --- a/Source/SPCopyTable.m +++ b/Source/SPCopyTable.m @@ -177,7 +177,7 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2003; [[self delegate] addRowToDB]; if (newRow>=[[self delegate] numberOfRowsInTableView:self]) return YES; //check again. addRowToDB could reload the table and change the number of rows - if (column>=[tableStorage columnCount]) return YES; //the column count could change too + if (tableStorage && column>=[tableStorage columnCount]) return YES; //the column count could change too [self selectRowIndexes:[NSIndexSet indexSetWithIndex:newRow] byExtendingSelection:NO]; [self editColumn:column row:newRow withEvent:nil select:YES]; @@ -200,7 +200,7 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2003; [[self delegate] addRowToDB]; if (newRow>=[[self delegate] numberOfRowsInTableView:self]) return YES; // addRowToDB could reload the table and change the number of rows - if (column>=[tableStorage columnCount]) return YES; //the column count could change too + if (tableStorage && column>=[tableStorage columnCount]) return YES; //the column count could change too [self selectRowIndexes:[NSIndexSet indexSetWithIndex:newRow] byExtendingSelection:NO]; [self editColumn:column row:newRow withEvent:nil select:YES]; -- cgit v1.2.3