Skip to content

Commit e49d33e

Browse files
committed
Add type info and remove unused ivars
1 parent 31a9b3b commit e49d33e

File tree

2 files changed

+32
-17
lines changed

2 files changed

+32
-17
lines changed

Source/SPTableContent.h

+28-16
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ typedef NS_ENUM(NSInteger, SPTableContentFilterSource) {
5858
@interface SPTableContent : NSObject <NSTableViewDelegate, NSTableViewDataSource, NSComboBoxDataSource, NSComboBoxDelegate, SPDatabaseContentViewDelegate>
5959
{
6060
IBOutlet SPDatabaseDocument *tableDocumentInstance;
61-
IBOutlet id tablesListInstance;
61+
IBOutlet SPTablesList *tablesListInstance;
6262
IBOutlet SPTableData* tableDataInstance;
63-
IBOutlet id tableSourceInstance;
63+
IBOutlet SPTableStructure *tableSourceInstance;
6464

6565
#ifndef SP_CODA
6666
IBOutlet SPTableInfo *tableInfoInstance;
@@ -70,16 +70,13 @@ typedef NS_ENUM(NSInteger, SPTableContentFilterSource) {
7070
IBOutlet SPCopyTable *tableContentView;
7171

7272
IBOutlet NSButton *toggleRuleFilterButton;
73-
IBOutlet id addButton;
74-
IBOutlet id duplicateButton;
75-
IBOutlet id removeButton;
76-
IBOutlet id reloadButton;
73+
IBOutlet NSButton *addButton;
74+
IBOutlet NSButton *duplicateButton;
75+
IBOutlet NSButton *removeButton;
76+
IBOutlet NSButton *reloadButton;
7777
#ifndef SP_CODA
7878
IBOutlet NSButton *multipleLineEditingButton;
7979
IBOutlet NSTextField *countText;
80-
IBOutlet id limitRowsField;
81-
IBOutlet id limitRowsButton;
82-
IBOutlet id limitRowsStepper;
8380
#endif
8481

8582
IBOutlet NSButton *paginationPreviousButton;
@@ -112,15 +109,27 @@ typedef NS_ENUM(NSInteger, SPTableContentFilterSource) {
112109
NSMutableArray *nibObjectsToRelease;
113110
#endif
114111

115-
NSString *selectedTable, *usedQuery;
112+
NSString *selectedTable;
113+
NSString *usedQuery;
116114
SPDataStorage *tableValues;
117-
NSMutableArray *dataColumns, *keys, *oldRow;
118-
NSUInteger tableRowsCount, previousTableRowsCount;
115+
NSMutableArray *dataColumns;
116+
NSMutableArray *keys;
117+
NSMutableArray *oldRow;
118+
NSUInteger tableRowsCount;
119+
NSUInteger previousTableRowsCount;
119120
NSNumber *sortCol;
120-
BOOL isEditingRow, isEditingNewRow, isSavingRow, isDesc, setLimit;
121-
BOOL isFiltered, isLimited, isInterruptedLoad, maxNumRowsIsEstimate;
121+
BOOL isEditingRow;
122+
BOOL isEditingNewRow;
123+
BOOL isSavingRow;
124+
BOOL isDesc;
125+
BOOL setLimit;
126+
BOOL isFiltered;
127+
BOOL isLimited;
128+
BOOL isInterruptedLoad;
129+
BOOL maxNumRowsIsEstimate;
122130
NSUserDefaults *prefs;
123-
NSInteger currentlyEditingRow, maxNumRows;
131+
NSInteger currentlyEditingRow;
132+
NSInteger maxNumRows;
124133

125134
NSUInteger contentPage;
126135

@@ -142,7 +151,10 @@ typedef NS_ENUM(NSInteger, SPTableContentFilterSource) {
142151
#endif
143152

144153
NSTimer *tableLoadTimer;
145-
NSUInteger tableLoadInterfaceUpdateInterval, tableLoadTimerTicksSinceLastUpdate, tableLoadLastRowCount, tableLoadTargetRowCount;
154+
NSUInteger tableLoadInterfaceUpdateInterval;
155+
NSUInteger tableLoadTimerTicksSinceLastUpdate;
156+
NSUInteger tableLoadLastRowCount;
157+
NSUInteger tableLoadTargetRowCount;
146158

147159
NSArray *cqColumnDefinition;
148160
BOOL isFirstChangeInView;

Source/SPTableContent.m

+4-1
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,7 @@ - (void)updateResultStore:(SPMySQLStreamingResultStore *)theResultStore approxim
950950
[theResultStore startDownload];
951951

952952
#ifndef SP_CODA
953+
#warning private ivar accessed from outside
953954
NSProgressIndicator *dataLoadingIndicator = [tableDocumentInstance valueForKey:@"queryProgressBar"];
954955
#else
955956
NSProgressIndicator *dataLoadingIndicator = [tableDocumentInstance queryProgressBar];
@@ -3325,7 +3326,8 @@ - (NSRect) viewport
33253326
*/
33263327
- (CGFloat) tablesListWidth
33273328
{
3328-
return [[[[tableDocumentInstance valueForKeyPath:@"contentViewSplitter"] subviews] objectAtIndex:0] frame].size.width;
3329+
#warning private ivar accessed from outside
3330+
return [[[[tableDocumentInstance valueForKey:@"contentViewSplitter"] subviews] objectAtIndex:0] frame].size.width;
33293331
}
33303332

33313333
/**
@@ -3524,6 +3526,7 @@ - (void)updateNumberOfRows
35243526
[tableDataInstance setStatusValue:@"y" forKey:@"RowsCountAccurate"];
35253527
#ifndef SP_CODA
35263528
[[tableInfoInstance onMainThread] tableChanged:nil];
3529+
#warning private ivar accessed from outside
35273530
[[[tableDocumentInstance valueForKey:@"extendedTableInfoInstance"] onMainThread] loadTable:selectedTable];
35283531
#endif
35293532

0 commit comments

Comments
 (0)