From 6f637e7b2b68de486c8fb5cd2e6ac5c0dd59c8c6 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 16 Jul 2009 18:55:24 +0000 Subject: =?UTF-8?q?=E2=80=A2=20some=20further=20work=20on=20outsourcing=20?= =?UTF-8?q?the=20Field=20Editor=20sheet=20for=20Content=20and=20Custom=20Q?= =?UTF-8?q?uery=20Tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Interfaces/English.lproj/FieldEditorSheet.xib | 1281 +++++++++++++++++++++++++ Source/SPFieldEditor.h | 3 +- Source/SPFieldEditor.m | 96 +- sequel-pro.xcodeproj/project.pbxproj | 12 + 4 files changed, 1348 insertions(+), 44 deletions(-) create mode 100644 Interfaces/English.lproj/FieldEditorSheet.xib diff --git a/Interfaces/English.lproj/FieldEditorSheet.xib b/Interfaces/English.lproj/FieldEditorSheet.xib new file mode 100644 index 00000000..71414e99 --- /dev/null +++ b/Interfaces/English.lproj/FieldEditorSheet.xib @@ -0,0 +1,1281 @@ + + + + 1050 + 9J61 + 677 + 949.46 + 353.00 + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + SPFieldEditor + + + FirstResponder + + + NSApplication + + + 9 + 2 + {{115, 389}, {667, 416}} + 1886912512 + Field Editor + NSWindow + + View + + {3.40282e+38, 3.40282e+38} + {560, 200} + + + 4370 + + YES + + + 34 + {{0, 36}, {667, 5}} + + {0, 0} + + 67239424 + 0 + Box + + LucidaGrande + 1.300000e+01 + 1044 + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 3 + MCAwLjgwMDAwMDAxAA + + + 3 + 2 + 0 + NO + + + + 257 + {{581, 7}, {66, 25}} + + 1 + YES + + 67239424 + 134348800 + OK + + LucidaGrande + 1.100000e+01 + 3100 + + 1 + + -2038284033 + 35 + + Helvetica + 1.100000e+01 + 16 + + + DQ + 200 + 25 + + + + + 257 + {{507, 7}, {66, 25}} + + YES + + 67239424 + 134348800 + Cancel + + + -2038284033 + 35 + + LucidaGrande + 1.100000e+01 + 16 + + + Gw + 200 + 25 + + + + + 256 + {{94, 7}, {66, 25}} + + YES + + 67239424 + 134348800 + Save... + + + -2038284033 + 268435491 + + + s + 200 + 25 + + + + + 256 + {{20, 7}, {66, 25}} + + YES + + 67239424 + 134348800 + Open... + + + -2038284033 + 268435491 + + + o + 200 + 25 + + + + + 292 + {{328, 7}, {48, 25}} + + YES + + 71433792 + 134350848 + + + -2031075073 + 33554467 + + + 400 + 75 + + + YES + + + 2147483647 + + NSImage + NSQuickLookTemplate + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + Image + + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + + + Sound (m4a) + + 2147483647 + + _popUpItemAction: + 1 + + + + + Sound (mp3) + + 2147483647 + + + _popUpItemAction: + 2 + + + + + Sound (linear) + + 2147483647 + + + _popUpItemAction: + 3 + + + + + Movie + + 2147483647 + + + _popUpItemAction: + 4 + + + + + pdf + + 2147483647 + + + _popUpItemAction: + 5 + + + + + html + + 2147483647 + + + _popUpItemAction: + 6 + + + + + doc + + 2147483647 + + + _popUpItemAction: + 7 + + + + + rtf + + 2147483647 + + + _popUpItemAction: + 8 + + + + + YES + 1 + YES + YES + 2 + + + + + 292 + {{183, 10}, {137, 19}} + + YES + + -2080244224 + 131072 + + + + YES + + 4.500000e+01 + Text + Show data as text + 0 + + + 4.400000e+01 + Image + Try to show data as image + 1 + YES + 0 + + + 4.400000e+01 + Hex + Show data hexadecimal + 0 + + + 1 + 2 + + + + + 274 + + YES + + + 2304 + + YES + + + 2322 + + YES + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + CorePasteboardFlavorType 0x6D6F6F76 + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {667, 14} + + + + + + + + + + + YES + + + 6 + + + + 6.670000e+02 + 1 + + + 2917 + + + 3 + MAA + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + System + selectedTextColor + + + + + + + + + 6 + {1334, 1e+07} + {283, 0} + + + + {667, 370} + + + + + + {4, -5} + 1 + + 4 + + + + -2147483392 + {{220, 1}, {11, 141}} + + 256 + + _doScroller: + 9.929578e-01 + + + + 256 + {{-100, -100}, {87, 18}} + + 257 + + _doScroller: + 1.000000e+00 + 9.456522e-01 + + + {{0, 39}, {667, 370}} + + + 528 + + + + + + + 274 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{0, 39}, {667, 370}} + + YES + + 270663168 + 32768 + 0 + 0 + 0 + YES + + YES + + + + 274 + + YES + + + 2304 + + YES + + + 2322 + + YES + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + Apple URL pasteboard type + CorePasteboardFlavorType 0x6D6F6F76 + CorePasteboardFlavorType 0x75726C20 + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + NeXT font pasteboard type + NeXT ruler pasteboard type + WebURLsWithTitlesPboardType + + + {667, 14} + + + + + + + + + + + YES + + + 6 + + + + 6.670000e+02 + 1 + + + 4067 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + + + + + + YES + + YES + NSColor + NSCursor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + {8, -8} + 13 + + + + + + + 6 + {1334, 1e+07} + {87, 0} + + + + {667, 370} + + + + + + 4 + + + + -2147483392 + {{639, 2}, {11, 359}} + + 256 + + _doScroller: + 6.016427e-01 + + + + 256 + {{-100, -100}, {87, 18}} + + 257 + + _doScroller: + 1.000000e+00 + 9.456522e-01 + + + {{0, 39}, {667, 370}} + + + 528 + + + + + + + 1325 + + {{325, 220}, {32, 32}} + + 28682 + 1.600000e+01 + 1.000000e+02 + + + + 10 + {{0, 407}, {667, 5}} + + {0, 0} + + 67239424 + 0 + Box + + + + 3 + MCAwLjgwMDAwMDAxAA + + + 3 + 2 + 0 + NO + + + {667, 416} + + + {{0, 0}, {1280, 778}} + {560, 222} + {3.40282e+38, 3.40282e+38} + SPEditSheet + + + + + YES + + + + YES + + 0 + + YES + + + + + + -2 + + + RmlsZSdzIE93bmVyA + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + YES + + + + Field Edit Sheet + + + 2 + + + YES + + + + + + + + + + + + + + + + + 3 + + + + + 4 + + + + + 5 + + + YES + + + + + + + + 6 + + + YES + + + + + + + + 7 + + + YES + + + + + + 8 + + + YES + + + + + + 9 + + + YES + + + + + + 10 + + + YES + + + + + + 11 + + + YES + + + + + + 12 + + + YES + + + + + + 13 + + + YES + + + + + + 14 + + + + + 15 + + + + + 16 + + + + + 17 + + + + + 18 + + + + + 19 + + + + + 20 + + + YES + + + + + + 21 + + + YES + + + + + + + + + + + + + + + 22 + + + + + 23 + + + + + 24 + + + + + 25 + + + + + 26 + + + + + 27 + + + + + 28 + + + + + 29 + + + + + 30 + + + + + 31 + + + + + 32 + + + + + 33 + + + + + 34 + + + + + 35 + + + + + 36 + + + + + 37 + + + + + 38 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1.IBEditorWindowLastContentRect + 1.IBWindowTemplateEditedContentRect + 1.ImportedFromIB2 + 1.windowTemplate.hasMaxSize + 1.windowTemplate.hasMinSize + 1.windowTemplate.maxSize + 1.windowTemplate.minSize + 10.IBPluginDependency + 10.ImportedFromIB2 + 11.IBPluginDependency + 11.ImportedFromIB2 + 12.IBPluginDependency + 12.ImportedFromIB2 + 13.IBPluginDependency + 13.ImportedFromIB2 + 14.IBPluginDependency + 15.IBPluginDependency + 16.IBPluginDependency + 17.IBPluginDependency + 18.IBPluginDependency + 19.IBPluginDependency + 2.IBPluginDependency + 2.ImportedFromIB2 + 20.IBPluginDependency + 21.IBEditorWindowLastContentRect + 21.IBPluginDependency + 22.IBPluginDependency + 23.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 27.IBPluginDependency + 28.IBPluginDependency + 29.IBPluginDependency + 3.IBPluginDependency + 30.IBPluginDependency + 31.IBPluginDependency + 32.IBPluginDependency + 33.IBPluginDependency + 33.IBShouldRemoveOnLegacySave + 34.IBPluginDependency + 34.IBShouldRemoveOnLegacySave + 35.IBPluginDependency + 35.ImportedFromIB2 + 36.CustomClassName + 36.IBPluginDependency + 36.ImportedFromIB2 + 37.IBPluginDependency + 37.IBShouldRemoveOnLegacySave + 38.IBPluginDependency + 38.IBShouldRemoveOnLegacySave + 4.IBPluginDependency + 5.IBPluginDependency + 5.ImportedFromIB2 + 6.IBPluginDependency + 6.ImportedFromIB2 + 7.CustomClassName + 7.IBPluginDependency + 7.ImportedFromIB2 + 8.IBAttributePlaceholdersKey + 8.IBPluginDependency + 9.IBPluginDependency + 9.IBSegmentedControlTracker.RoundRobinState + 9.IBSegmentedControlTracker.WasGrowing + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{226, 92}, {667, 416}} + {{226, 92}, {667, 416}} + + + + {3.40282e+38, 3.40282e+38} + {560, 200} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + {{705, 112}, {126, 173}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + SPEditSheetTextView + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + CMImageView + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Choose a data format to display the current data by using QuickLook + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 39 + + + + YES + + CMImageView + NSImageView + + delegate + id + + + IBUserSource + + + + + SPEditSheetTextView + NSTextView + + IBUserSource + + + + + + YES + + SPFieldEditor + NSWindow + + YES + + YES + closeEditSheet: + dropImage: + openEditSheet: + quickLookFormatButton: + saveEditSheet: + segmentControllerChanged: + + + YES + id + id + id + id + id + id + + + + YES + + YES + editImage + editSheetProgressBar + editSheetQuickLookButton + editSheetSegmentControl + editTextScrollView + editTextView + hexTextScrollView + hexTextView + sheetEditData + + + YES + id + id + id + id + id + id + id + id + id + + + + IBDocumentRelativeSource + ../../Source/SPFieldEditor.h + + + + + 0 + + 3 + + diff --git a/Source/SPFieldEditor.h b/Source/SPFieldEditor.h index ff7cd5c6..1271b483 100644 --- a/Source/SPFieldEditor.h +++ b/Source/SPFieldEditor.h @@ -12,7 +12,6 @@ @interface SPFieldEditor : NSWindow { IBOutlet id editSheetProgressBar; - IBOutlet id editSheet; IBOutlet id editSheetSegmentControl; IBOutlet id editSheetQuickLookButton; IBOutlet id editImage; @@ -21,7 +20,7 @@ IBOutlet id editTextScrollView; IBOutlet id hexTextScrollView; - id editData; + id sheetEditData; NSString *stringValue; diff --git a/Source/SPFieldEditor.m b/Source/SPFieldEditor.m index 3a389f6e..e8ac915f 100644 --- a/Source/SPFieldEditor.m +++ b/Source/SPFieldEditor.m @@ -16,10 +16,18 @@ @implementation SPFieldEditor +// - (id) init +// { +// [self clean]; +// self = [super init]; +// return self; +// } - (void)initWithObject:(id)data usingEncoding:(NSStringEncoding)anEncoding isObjectBlob:(BOOL)isFieldBlob { + [self clean]; + // hide all views in editSheet [hexTextView setHidden:YES]; [hexTextScrollView setHidden:YES]; @@ -33,7 +41,9 @@ isBlob = isFieldBlob; - editData = [data retain]; + // sheetEditData = data; + sheetEditData = [data copy]; + NSLog(@"bbb:%@", sheetEditData); // hide all views in editSheet [hexTextView setHidden:YES]; @@ -48,15 +58,15 @@ [editSheetProgressBar startAnimation:self]; NSImage *image = nil; - if ( [editData isKindOfClass:[NSData class]] ) { - image = [[[NSImage alloc] initWithData:editData] autorelease]; + if ( [sheetEditData isKindOfClass:[NSData class]] ) { + image = [[[NSImage alloc] initWithData:sheetEditData] autorelease]; // Set hex view to "" - load on demand only [hexTextView setString:@""]; - stringValue = [[NSString alloc] initWithData:editData encoding:encoding]; + stringValue = [[NSString alloc] initWithData:sheetEditData encoding:encoding]; if (stringValue == nil) - stringValue = [[NSString alloc] initWithData:editData encoding:NSASCIIStringEncoding]; + stringValue = [[NSString alloc] initWithData:sheetEditData encoding:NSASCIIStringEncoding]; [hexTextView setHidden:NO]; [hexTextScrollView setHidden:NO]; @@ -65,7 +75,7 @@ [editTextScrollView setHidden:YES]; [editSheetSegmentControl setSelectedSegment:2]; } else { - stringValue = [editData retain]; + stringValue = [sheetEditData retain]; [hexTextView setString:@""]; @@ -91,6 +101,7 @@ } if (stringValue) { [editTextView setString:stringValue]; + NSLog(@"tv:%@", [editTextView class]); if(image == nil) { [hexTextView setHidden:YES]; @@ -126,17 +137,18 @@ - (void)clean { [hexTextView setString:@""]; - [editTextView setString:@""]; + [editTextView setString:@"AA"]; [editImage setImage:nil]; - if ( editData ) { - [editData release]; + if ( sheetEditData ) { + [sheetEditData release]; } } - (id)editData { - return editData; + NSLog(@"aa:%@", sheetEditData); + return [sheetEditData copy]; } @@ -158,17 +170,17 @@ [editSheetProgressBar startAnimation:self]; // free old data - if ( editData != nil ) { - [editData release]; + if ( sheetEditData != nil ) { + [sheetEditData release]; } // load new data/images - editData = [[NSData alloc] initWithContentsOfFile:fileName]; + sheetEditData = [[NSData alloc] initWithContentsOfFile:fileName]; - NSImage *image = [[NSImage alloc] initWithData:editData]; - contents = [[NSString alloc] initWithData:editData encoding:encoding]; + NSImage *image = [[NSImage alloc] initWithData:sheetEditData]; + contents = [[NSString alloc] initWithData:sheetEditData encoding:encoding]; if (contents == nil) - contents = [[NSString alloc] initWithData:editData encoding:NSASCIIStringEncoding]; + contents = [[NSString alloc] initWithData:sheetEditData encoding:NSASCIIStringEncoding]; // set the image preview, string contents and hex representation [editImage setImage:image]; @@ -181,7 +193,7 @@ // Load hex data only if user has already displayed them if(![[hexTextView string] isEqualToString:@""]) - [hexTextView setString:[editData dataToFormattedHexString]]; + [hexTextView setString:[sheetEditData dataToFormattedHexString]]; // If the image cell now contains a valid image, select the image view if (image) { @@ -222,7 +234,7 @@ [editImage setHidden:YES]; [hexTextView setHidden:YES]; [hexTextScrollView setHidden:YES]; - [editSheet makeFirstResponder:editTextView]; + // [self makeFirstResponder:editTextView]; break; case 1: // image [editTextView setHidden:YES]; @@ -230,12 +242,12 @@ [editImage setHidden:NO]; [hexTextView setHidden:YES]; [hexTextScrollView setHidden:YES]; - [editSheet makeFirstResponder:editImage]; + // [self makeFirstResponder:editImage]; break; case 2: // hex - load on demand - if([editData length] && [[hexTextView string] isEqualToString:@""]) { + if([sheetEditData length] && [[hexTextView string] isEqualToString:@""]) { [editSheetProgressBar startAnimation:self]; - [hexTextView setString:[editData dataToFormattedHexString]]; + [hexTextView setString:[sheetEditData dataToFormattedHexString]]; [editSheetProgressBar stopAnimation:self]; } [editTextView setHidden:YES]; @@ -243,7 +255,7 @@ [editImage setHidden:YES]; [hexTextView setHidden:NO]; [hexTextScrollView setHidden:NO]; - [editSheet makeFirstResponder:hexTextView]; + // [self makeFirstResponder:hexTextView]; break; } } @@ -263,12 +275,12 @@ // Write binary field types directly to the file //// || [editSheetBinaryButton state] == NSOnState - if ( [editData isKindOfClass:[NSData class]] ) { - [editData writeToFile:fileName atomically:YES]; + if ( [sheetEditData isKindOfClass:[NSData class]] ) { + [sheetEditData writeToFile:fileName atomically:YES]; // Write other field types' representations to the file via the current encoding } else { - [[editData description] writeToFile:fileName + [[sheetEditData description] writeToFile:fileName atomically:YES encoding:encoding error:NULL]; @@ -314,12 +326,12 @@ NSString *tmpFileName = [NSString stringWithFormat:@"/tmp/SequelProQuickLook.%@", type]; // if data are binary - if ( [editData isKindOfClass:[NSData class]] || !isText) { - [editData writeToFile:tmpFileName atomically:YES]; + if ( [sheetEditData isKindOfClass:[NSData class]] || !isText) { + [sheetEditData writeToFile:tmpFileName atomically:YES]; // write other field types' representations to the file via the current encoding } else { - [[editData description] writeToFile:tmpFileName + [[sheetEditData description] writeToFile:tmpFileName atomically:YES encoding:encoding error:NULL]; @@ -406,21 +418,21 @@ image = [[[NSImage alloc] initWithPasteboard:[NSPasteboard generalPasteboard]] autorelease]; if (image) { - if (nil != editData) [editData release]; + if (nil != sheetEditData) [sheetEditData release]; [editImage setImage:image]; - editData = [[NSData alloc] initWithData:[image TIFFRepresentationUsingCompression:NSTIFFCompressionLZW factor:1]]; + sheetEditData = [[NSData alloc] initWithData:[image TIFFRepresentationUsingCompression:NSTIFFCompressionLZW factor:1]]; - NSString *contents = [[NSString alloc] initWithData:editData encoding:encoding]; + NSString *contents = [[NSString alloc] initWithData:sheetEditData encoding:encoding]; if (contents == nil) - contents = [[NSString alloc] initWithData:editData encoding:NSASCIIStringEncoding]; + contents = [[NSString alloc] initWithData:sheetEditData encoding:NSASCIIStringEncoding]; // Set the string contents and hex representation if(contents) [editTextView setString:contents]; if(![[hexTextView string] isEqualToString:@""]) - [hexTextView setString:[editData dataToFormattedHexString]]; + [hexTextView setString:[sheetEditData dataToFormattedHexString]]; [contents release]; @@ -437,11 +449,11 @@ editSheetWillBeInitialized = YES; - if (nil != editData) [editData release]; + if (nil != sheetEditData) [sheetEditData release]; // If the image was not processed, set a blank string as the contents of the edit and hex views. if ( data == nil ) { - editData = [[NSData alloc] init]; + sheetEditData = [[NSData alloc] init]; [editTextView setString:@""]; [hexTextView setString:@""]; editSheetWillBeInitialized = NO; @@ -449,7 +461,7 @@ } // Process the provided image - editData = [[NSData alloc] initWithData:data]; + sheetEditData = [[NSData alloc] initWithData:data]; NSString *contents = [[NSString alloc] initWithData:data encoding:encoding]; if (contents == nil) contents = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding]; @@ -458,7 +470,7 @@ if(contents) [editTextView setString:contents]; if(![[hexTextView string] isEqualToString:@""]) - [hexTextView setString:[editData dataToFormattedHexString]]; + [hexTextView setString:[sheetEditData dataToFormattedHexString]]; [contents release]; editSheetWillBeInitialized = NO; @@ -470,8 +482,8 @@ // If the image was deleted, set a blank string as the contents of the edit and hex views. // The actual dropped image processing is handled by processUpdatedImageData:. if ( [editImage image] == nil ) { - if (nil != editData) [editData release]; - editData = [[NSData alloc] init]; + if (nil != sheetEditData) [sheetEditData release]; + sheetEditData = [[NSData alloc] init]; [editTextView setString:@""]; [hexTextView setString:@""]; return; @@ -493,12 +505,12 @@ [hexTextView setString:@""]; // free old data - if ( editData != nil ) { - [editData release]; + if ( sheetEditData != nil ) { + [sheetEditData release]; } // set edit data to text - editData = [[editTextView string] retain]; + sheetEditData = [[editTextView string] retain]; } diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj index 225cbcbb..5746922d 100644 --- a/sequel-pro.xcodeproj/project.pbxproj +++ b/sequel-pro.xcodeproj/project.pbxproj @@ -161,6 +161,7 @@ BC2C8E220FA8C2DB008468C7 /* sequel-pro-mysql-help-template.html in Resources */ = {isa = PBXBuildFile; fileRef = BC2C8E210FA8C2DB008468C7 /* sequel-pro-mysql-help-template.html */; }; BC8C8532100E0A8000D7A129 /* SPTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8C8531100E0A8000D7A129 /* SPTableView.m */; }; BC99296E0FF3D001008B79AB /* SPFieldEditor.m in Sources */ = {isa = PBXBuildFile; fileRef = BC99296D0FF3D001008B79AB /* SPFieldEditor.m */; }; + BCA6F631100FA7D700E80253 /* FieldEditorSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCA6F62F100FA7D700E80253 /* FieldEditorSheet.xib */; }; BCD0AD490FBBFC340066EA5C /* SPSQLTokenizer.l in Sources */ = {isa = PBXBuildFile; fileRef = BCD0AD480FBBFC340066EA5C /* SPSQLTokenizer.l */; }; /* End PBXBuildFile section */ @@ -458,6 +459,7 @@ BC8C8531100E0A8000D7A129 /* SPTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPTableView.m; sourceTree = ""; }; BC99296C0FF3D001008B79AB /* SPFieldEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPFieldEditor.h; sourceTree = ""; }; BC99296D0FF3D001008B79AB /* SPFieldEditor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPFieldEditor.m; sourceTree = ""; }; + BCA6F630100FA7D700E80253 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/FieldEditorSheet.xib; sourceTree = ""; }; BCD0AD480FBBFC340066EA5C /* SPSQLTokenizer.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = SPSQLTokenizer.l; sourceTree = ""; }; BCD0AD4A0FBBFC480066EA5C /* SPSQLTokenizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPSQLTokenizer.h; sourceTree = ""; }; /* End PBXFileReference section */ @@ -845,6 +847,7 @@ 17E642050EF020A3001BC333 /* Interfaces */ = { isa = PBXGroup; children = ( + BCA6F62F100FA7D700E80253 /* FieldEditorSheet.xib */, 17E642060EF020CB001BC333 /* DBView.xib */, B52460D90F8EF93B00171639 /* Console.xib */, 1761FD460EF03A6F00331368 /* MainMenu.xib */, @@ -1164,6 +1167,7 @@ B5538AB00FF251EE00219803 /* button_pane_show_icon.tif in Resources */, 5822CAE110011C8000DCC3D6 /* ConnectionView.xib in Resources */, BC1E55C4100DC92200AAE9F0 /* table-view-small-square.tiff in Resources */, + BCA6F631100FA7D700E80253 /* FieldEditorSheet.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1400,6 +1404,14 @@ name = ExportDialog.xib; sourceTree = ""; }; + BCA6F62F100FA7D700E80253 /* FieldEditorSheet.xib */ = { + isa = PBXVariantGroup; + children = ( + BCA6F630100FA7D700E80253 /* English */, + ); + name = FieldEditorSheet.xib; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ -- cgit v1.2.3