diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-07-17 13:48:05 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-07-17 13:48:05 +0000 |
commit | deceb4635c0688121ef68962196d5f0fb221abff (patch) | |
tree | 87ed36cb526492f8158c6f75639e383bf0c1a63b /Source/SPFieldEditorController.m | |
parent | ea68a07c5b1e2167f17ee8528faf43650997511a (diff) | |
download | sequelpro-deceb4635c0688121ef68962196d5f0fb221abff.tar.gz sequelpro-deceb4635c0688121ef68962196d5f0fb221abff.tar.bz2 sequelpro-deceb4635c0688121ef68962196d5f0fb221abff.zip |
• fixed inField Editor Sheet:
- if textView was changed update hexView (if demanded) according to the correct data type
Diffstat (limited to 'Source/SPFieldEditorController.m')
-rw-r--r-- | Source/SPFieldEditorController.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m index 2f169ebd..12fcb6a5 100644 --- a/Source/SPFieldEditorController.m +++ b/Source/SPFieldEditorController.m @@ -271,7 +271,11 @@ case 2: // hex - load on demand if([sheetEditData length] && [[hexTextView string] isEqualToString:@""]) { [editSheetProgressBar startAnimation:self]; - [hexTextView setString:[sheetEditData dataToFormattedHexString]]; + if([sheetEditData isKindOfClass:[NSData class]]) { + [hexTextView setString:[sheetEditData dataToFormattedHexString]]; + } else { + [hexTextView setString:[[sheetEditData dataUsingEncoding:encoding allowLossyConversion:YES] dataToFormattedHexString]]; + } [editSheetProgressBar stopAnimation:self]; } [editTextView setHidden:YES]; @@ -561,7 +565,7 @@ } // set edit data to text - sheetEditData = [[editTextView string] retain]; + sheetEditData = [[NSString stringWithString:[editTextView string]] retain]; } |