aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-10-19 21:43:02 +0000
committerstuconnolly <stuart02@gmail.com>2010-10-19 21:43:02 +0000
commit10990abb16783d89e5314549883fc1e5acc2e407 (patch)
tree87d259828e7d6dfdbe497c92d8ddd7f3f0223111
parent3e67e208428399a6f802cffe0e6966f89b39e254 (diff)
downloadsequelpro-10990abb16783d89e5314549883fc1e5acc2e407.tar.gz
sequelpro-10990abb16783d89e5314549883fc1e5acc2e407.tar.bz2
sequelpro-10990abb16783d89e5314549883fc1e5acc2e407.zip
Update indexes controller constants.
-rw-r--r--Source/SPConstants.h7
-rw-r--r--Source/SPIndexesController.h7
-rw-r--r--Source/SPIndexesController.m10
3 files changed, 12 insertions, 12 deletions
diff --git a/Source/SPConstants.h b/Source/SPConstants.h
index 5cbfa463..0992cc1b 100644
--- a/Source/SPConstants.h
+++ b/Source/SPConstants.h
@@ -23,6 +23,13 @@
//
// More info at <http://code.google.com/p/sequel-pro/>
+/**
+ * This header should be used to define constants that are used globally (i.e. among multiple classes/files).
+ * Constants that need only be defined for a particular class should be done within the implementation file
+ * of said class. Try to avoid the use of macros to define constants as much as possible as they do not incur
+ * type checking when used and cannot be tested for equality.
+ */
+
// View modes
typedef enum {
SPStructureViewMode = 1,
diff --git a/Source/SPIndexesController.h b/Source/SPIndexesController.h
index 4d23aa3d..02dade6c 100644
--- a/Source/SPIndexesController.h
+++ b/Source/SPIndexesController.h
@@ -25,13 +25,6 @@
@class SPDatabaseDocument, SPTablesList, SPTableData, SPTableStructure, MCPConnection, BWAnchoredButtonBar;
-// Constants
-extern NSString *SPNewIndexIndexName;
-extern NSString *SPNewIndexIndexType;
-extern NSString *SPNewIndexIndexedColumns;
-extern NSString *SPNewIndexStorageType;
-extern NSString *SPNewIndexKeyBlockSize;
-
@interface SPIndexesController : NSWindowController
{
// Controllers
diff --git a/Source/SPIndexesController.m b/Source/SPIndexesController.m
index 70796575..09f1a3d8 100644
--- a/Source/SPIndexesController.m
+++ b/Source/SPIndexesController.m
@@ -28,11 +28,11 @@
#import "SPServerSupport.h"
// Constants
-NSString *SPNewIndexIndexName = @"IndexName";
-NSString *SPNewIndexIndexType = @"IndexType";
-NSString *SPNewIndexIndexedColumns = @"IndexedColumns";
-NSString *SPNewIndexStorageType = @"IndexStorageType";
-NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize";
+static const NSString *SPNewIndexIndexName = @"IndexName";
+static const NSString *SPNewIndexIndexType = @"IndexType";
+static const NSString *SPNewIndexIndexedColumns = @"IndexedColumns";
+static const NSString *SPNewIndexStorageType = @"IndexStorageType";
+static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize";
@interface SPIndexesController (PrivateAPI)