aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDataCellFormatter.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-08-12 15:05:15 +0000
committerBibiko <bibiko@eva.mpg.de>2009-08-12 15:05:15 +0000
commit3946e0c6c1e26af2b65590a1f0f50ab25c1c3bfb (patch)
tree5407dbadbe821ce4cc8f0e2187ee006c37afbc1a /Source/SPDataCellFormatter.m
parent5564ae966603f6727c3fc6ad5b68811128b4ea80 (diff)
downloadsequelpro-3946e0c6c1e26af2b65590a1f0f50ab25c1c3bfb.tar.gz
sequelpro-3946e0c6c1e26af2b65590a1f0f50ab25c1c3bfb.tar.bz2
sequelpro-3946e0c6c1e26af2b65590a1f0f50ab25c1c3bfb.zip
• SPFieldEditor sheet now runs in a NSModalSession run loop to allow the execution of code in NSDefaultRunLoopMode (including showing Tooltips)
- improved max text length checking while inserting a text chunk if a selection is given (now it truncates it correctly) - instead of using NSBeep() while text length checking a Tooltip will be shown • fine-tuned SPTooltip: • max text validation in TableContent (cell editing) shows now a tooltip if text too long Note: Tooltip messages are tentative so far
Diffstat (limited to 'Source/SPDataCellFormatter.m')
-rw-r--r--Source/SPDataCellFormatter.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPDataCellFormatter.m b/Source/SPDataCellFormatter.m
index 3860c058..5a768686 100644
--- a/Source/SPDataCellFormatter.m
+++ b/Source/SPDataCellFormatter.m
@@ -24,7 +24,7 @@
// More info at <http://code.google.com/p/sequel-pro/>
#import "SPDataCellFormatter.h"
-
+#import "SPTooltip.h"
@implementation SPDataCellFormatter
@@ -82,13 +82,13 @@
// A single character over the length of the string - likely typed. Prevent the change.
if ([partialString length] == textLimit + 1) {
- NSBeep();
+ [SPTooltip showWithObject:[NSString stringWithFormat:NSLocalizedString(@"Maximum text length is set to %d.", @"Maximum text length is set to %d."), textLimit]];
return NO;
}
// If the string is considerably longer than the limit, likely pasted. Accept but truncate.
if ([partialString length] > textLimit) {
- NSBeep();
+ [SPTooltip showWithObject:[NSString stringWithFormat:NSLocalizedString(@"Maximum text length is set to %d. Inserted text was truncated.", @"Maximum text length is set to %d. Inserted text was truncated."), textLimit]];
*newString = [NSString stringWithString:[partialString substringToIndex:textLimit]];
return NO;
}