aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r--Source/TableContent.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 5876141c..fba8a3ed 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -30,6 +30,7 @@
#import "SPDataCellFormatter.h"
#import "SPTableData.h"
+
@implementation TableContent
- (id)init
@@ -167,6 +168,11 @@
[dataCell setLineBreakMode:NSLineBreakByTruncatingTail];
[dataCell setFormatter:[[SPDataCellFormatter new] autorelease]];
+ // Set field length limit if field is a varchar to match varchar length
+ if ([[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"string"]) {
+ [[dataCell formatter] setTextLimit:[[columnDefinition objectForKey:@"length"] intValue]];
+ }
+
// Set the data cell font according to the preferences
if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
[dataCell setFont:[NSFont fontWithName:@"Monaco" size:10]];
@@ -1860,6 +1866,15 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn
#pragma mark -
+- (void)controlTextDidChange:(NSNotification *)aNotification
+{
+ NSString *fieldType;
+ int row, column, i;
+
+ row = [tableContentView editedRow];
+ column = [tableContentView editedColumn];
+}
+
/*
* Trap the enter and escape keys, overriding default behaviour and continuing/ending editing,
* only within the current row.