From 0ac3566207ed0720101f6bdfbf30c852e8b30f98 Mon Sep 17 00:00:00 2001 From: Zachary Schneirov Date: Sun, 13 Sep 2009 16:20:36 -0500 Subject: [PATCH] use firstCharacterIgnoringModifiers/firstCharacter methods that return USHRT_MAX for empty strings to allow for dead keys --- AppController.m | 2 +- BookmarksTable.m | 3 +- DualField.m | 2 +- Info.plist | 6 +- LinkingEditor.m | 5 +- NSString_NV.h | 7 +- NSString_NV.m | 17 ++ Notation.xcodeproj/scrod.mode1v3 | 189 ++++++++------ Notation.xcodeproj/scrod.pbxuser | 417 ++++++++++++++++++++++--------- NotesTableView.m | 5 +- 10 files changed, 451 insertions(+), 202 deletions(-) diff --git a/AppController.m b/AppController.m index 8e116015..3e2d8c30 100644 --- a/AppController.m +++ b/AppController.m @@ -713,7 +713,7 @@ - (BOOL)control:(NSControl *)control textView:(NSTextView *)aTextView doCommandB //control-U is not set to anything by default, so we have to check the event itself for noops NSEvent *event = [window currentEvent]; if ([event modifierFlags] & NSControlKeyMask) { - if ([[event charactersIgnoringModifiers] characterAtIndex:0] == 'u') { + if ([event firstCharacterIgnoringModifiers] == 'u') { //in 1.1.1 this deleted the entire line, like tcsh. this is more in-line with bash [aTextView deleteToBeginningOfLine:nil]; return YES; diff --git a/BookmarksTable.m b/BookmarksTable.m index 8034462a..218e7625 100644 --- a/BookmarksTable.m +++ b/BookmarksTable.m @@ -1,5 +1,6 @@ #import "BookmarksTable.h" #import "BookmarksController.h" +#import "NSString_NV.h" @implementation BookmarksTable @@ -15,7 +16,7 @@ - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent { - (void)keyDown:(NSEvent*)theEvent { - unichar keyChar = [[theEvent characters] characterAtIndex:0]; + unichar keyChar = [theEvent firstCharacter]; if (keyChar == NSDeleteCharacter || keyChar == NSDeleteFunctionKey) { [(BookmarksController*)[self dataSource] removeBookmark:nil]; diff --git a/DualField.m b/DualField.m index bc1d424c..33bf5c61 100644 --- a/DualField.m +++ b/DualField.m @@ -204,7 +204,7 @@ - (unsigned int)lastLengthReplaced { /* - (BOOL)performKeyEquivalent:(NSEvent *)anEvent { - unichar keyChar = [[anEvent charactersIgnoringModifiers] characterAtIndex:0]; + unichar keyChar = [anEvent firstCharacterIgnoringModifiers]; if (keyChar == NSCarriageReturnCharacter || keyChar == NSNewlineCharacter || keyChar == NSEnterCharacter) { diff --git a/Info.plist b/Info.plist index 45b528ba..a8880c65 100644 --- a/Info.plist +++ b/Info.plist @@ -132,7 +132,7 @@ CFBundleExecutable Notational Velocity CFBundleGetInfoString - 2.0 β, Copyright © 2009 Zachary Schneirov, All Rights Reserved. + 2.0 β0, Copyright © 2009 Zachary Schneirov, All Rights Reserved. CFBundleIconFile Notality CFBundleIdentifier @@ -142,11 +142,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.0 β + 2.0 β0 CFBundleSignature N†l√ CFBundleVersion - 2.0 β + 2.0 β0 LSMinimumSystemVersion 10.3.9 NSMainNibFile diff --git a/LinkingEditor.m b/LinkingEditor.m index e0db0d06..f3f30d68 100644 --- a/LinkingEditor.m +++ b/LinkingEditor.m @@ -748,7 +748,7 @@ - (IBAction)performFindPanelAction:(id)sender { - (BOOL)performKeyEquivalent:(NSEvent *)anEvent { - unichar keyChar = [[anEvent charactersIgnoringModifiers] characterAtIndex:0]; + unichar keyChar = [anEvent firstCharacterIgnoringModifiers]; if (keyChar == NSCarriageReturnCharacter || keyChar == NSNewlineCharacter || keyChar == NSEnterCharacter) { @@ -767,7 +767,7 @@ - (BOOL)performKeyEquivalent:(NSEvent *)anEvent { } - (void)keyDown:(NSEvent*)anEvent { - unichar keyChar = [[anEvent charactersIgnoringModifiers] characterAtIndex:0]; + unichar keyChar = [anEvent firstCharacterIgnoringModifiers]; if (keyChar == NSBackTabCharacter) { //apparently interpretKeyEvents: on 10.3 does not call insertBacktab @@ -775,7 +775,6 @@ - (void)keyDown:(NSEvent*)anEvent { [self doCommandBySelector:@selector(insertBacktab:)]; return; } - [super keyDown:anEvent]; } - (void)insertTab:(id)sender { diff --git a/NSString_NV.h b/NSString_NV.h index 22f66e3b..1474440a 100644 --- a/NSString_NV.h +++ b/NSString_NV.h @@ -47,4 +47,9 @@ void resetCurrentDayTime(); @interface NSMutableString (NV) + (NSMutableString*)getShortLivedStringFromData:(NSMutableData*)data ofGuessedEncoding:(NSStringEncoding*)encoding; -@end \ No newline at end of file +@end + +@interface NSEvent (NV) +- (unichar)firstCharacter; +- (unichar)firstCharacterIgnoringModifiers; +@end diff --git a/NSString_NV.m b/NSString_NV.m index ab920fa9..458e2f07 100644 --- a/NSString_NV.m +++ b/NSString_NV.m @@ -605,3 +605,20 @@ + (NSMutableString*)getShortLivedStringFromData:(NSMutableData*)data ofGuessedEn } @end + + +@implementation NSEvent (NV) + +- (unichar)firstCharacter { + NSString *chars = [self characters]; + if ([chars length]) return [chars characterAtIndex:0]; + return USHRT_MAX; +} + +- (unichar)firstCharacterIgnoringModifiers { + NSString *chars = [self charactersIgnoringModifiers]; + if ([chars length]) return [chars characterAtIndex:0]; + return USHRT_MAX; +} + +@end diff --git a/Notation.xcodeproj/scrod.mode1v3 b/Notation.xcodeproj/scrod.mode1v3 index acaa736c..7003face 100644 --- a/Notation.xcodeproj/scrod.mode1v3 +++ b/Notation.xcodeproj/scrod.mode1v3 @@ -193,28 +193,49 @@ Name Default Notifications + + OpenEditors - XCObserverAutoDisconnectKey - - XCObserverDefintionKey - - XCObserverFactoryKey - XCPerspectivesSpecificationIdentifier - XCObserverGUIDKey - XCObserverProjectIdentifier - XCObserverNotificationKey - PBXStatusBuildStateMessageNotification - XCObserverTargetKey - XCMainBuildResultsModuleGUID - XCObserverTriggerKey - awakenModuleWithObserver: - XCObserverValidationKey - + Content + + PBXProjectModuleGUID + 21B544E2105D901A002097C4 + PBXProjectModuleLabel + LinkingEditor.m + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 21B544E3105D901A002097C4 + PBXProjectModuleLabel + LinkingEditor.m + _historyCapacity + 0 + bookmark + 2139CF5C105D986E00FD961B + history + + 21C8157C105D9679006479FC + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {987, 717}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 318 120 987 758 0 0 1440 878 + - - OpenEditors - Content @@ -233,10 +254,10 @@ _historyCapacity 0 bookmark - 21813570105B04BE00A0AE18 + 2139CF5D105D986E00FD961B history - 218134E4105AEA8500A0AE18 + 21C8157D105D9679006479FC SplitCount @@ -248,11 +269,11 @@ Geometry Frame - {{0, 20}, {966, 946}} + {{0, 20}, {966, 717}} PBXModuleWindowStatusBarHidden2 RubberWindowFrame - 574 191 966 987 0 0 1920 1178 + 285 120 966 758 0 0 1440 878 @@ -273,10 +294,10 @@ _historyCapacity 0 bookmark - 21813571105B04BE00A0AE18 + 2139CF5E105D986E00FD961B history - 218134E5105AEA8500A0AE18 + 21C8157E105D9679006479FC SplitCount @@ -288,11 +309,11 @@ Geometry Frame - {{0, 20}, {1144, 940}} + {{0, 20}, {1144, 717}} PBXModuleWindowStatusBarHidden2 RubberWindowFrame - 301 142 1144 981 0 0 1920 1178 + 115 120 1144 758 0 0 1440 878 @@ -381,7 +402,6 @@ 1058C7A2FEA54F0111CA2CBB 19C28FACFE9D520D11CA2CBB 1C37FBAC04509CD000000102 - 218134EA105AEA8700A0AE18 1C37FAAC04509CD000000102 1C37FABC05509CD000000102 1C37FABC05539CD112110102 @@ -389,11 +409,13 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey + 152 + 131 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {337, 980}} + {{0, 2070}, {337, 700}} PBXTopSmartGroupGIDs @@ -405,14 +427,14 @@ GeometryConfiguration Frame - {{0, 0}, {354, 998}} + {{0, 0}, {354, 718}} GroupTreeTableConfiguration MainColumn 337 RubberWindowFrame - 86 139 359 1039 0 0 1920 1178 + 45 119 359 759 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -428,7 +450,7 @@ PBXProjectModuleGUID 1CE0B20306471E060097A5F4 PBXProjectModuleLabel - Notality.icns + AppController.m PBXSplitModuleInNavigatorKey Split0 @@ -436,11 +458,11 @@ PBXProjectModuleGUID 1CE0B20406471E060097A5F4 PBXProjectModuleLabel - Notality.icns + AppController.m _historyCapacity 0 bookmark - 2181356F105B04BE00A0AE18 + 2139CF5B105D986E00FD961B history 21C61FAB10542D40004D5948 @@ -451,7 +473,6 @@ 21C61FEC10542FB9004D5948 21C61FED10542FB9004D5948 21C61FEE10542FB9004D5948 - 21C6206310543D7D004D5948 21C6206410543D7D004D5948 21C6206510543D7D004D5948 21C6206610543D7D004D5948 @@ -468,7 +489,13 @@ 21C6207110543D7D004D5948 214C6C641054454C0085D386 214C6C651054454C0085D386 - 218134E0105AEA8500A0AE18 + 21B5447D105D7963002097C4 + 21B54535105D953C002097C4 + 21B54536105D953C002097C4 + 21B54537105D953C002097C4 + 2139CF51105D985D00FD961B + 2139CF52105D985D00FD961B + 2139CF53105D985D00FD961B prevStack @@ -497,6 +524,12 @@ 21C6208010543D7D004D5948 21C6208110543D7D004D5948 214C6C681054454C0085D386 + 21B5447F105D7963002097C4 + 21B5453A105D953C002097C4 + 21B5453B105D953C002097C4 + 21B5453D105D953C002097C4 + 2139CF54105D985D00FD961B + 2139CF55105D985D00FD961B SplitCount @@ -510,7 +543,7 @@ Frame {{0, 0}, {0, 0}} RubberWindowFrame - 86 139 359 1039 0 0 1920 1178 + 45 119 359 759 0 0 1440 878 Module PBXNavigatorGroup @@ -528,14 +561,14 @@ GeometryConfiguration Frame - {{0, 5}, {0, 993}} + {{0, 5}, {0, 713}} RubberWindowFrame - 86 139 359 1039 0 0 1920 1178 + 45 119 359 759 0 0 1440 878 Module XCDetailModule Proportion - 993pt + 713pt Proportion @@ -554,9 +587,9 @@ TableOfContents - 218134EE105AEA9900A0AE18 + 2139CF31105D96EA00FD961B 1CE0B1FE06471DED0097A5F4 - 218134EF105AEA9900A0AE18 + 2139CF32105D96EA00FD961B 1CE0B20306471E060097A5F4 1CE0B20506471E060097A5F4 @@ -673,7 +706,7 @@ StatusbarIsVisible TimeStamp - 274400446.864447 + 0.0 ToolbarDisplayMode 1 ToolbarIsVisible @@ -689,15 +722,17 @@ WindowOrderList 1C530D57069F1CE1000CFCEE - 1CD10A99069EF8BA00B06720 1C78EAAD065D492600B07095 + 1CD10A99069EF8BA00B06720 + 21B54540105D953C002097C4 218134B0105AE47A00A0AE18 210092411059673F003BFE5E 21C6208410543D7D004D5948 /Users/scrod/Projects/Notation/Notation.xcodeproj + 21B544E2105D901A002097C4 WindowString - 86 139 359 1039 0 0 1920 1178 + 45 119 359 759 0 0 1440 878 WindowToolsV3 @@ -727,7 +762,7 @@ Frame {{0, 0}, {759, 226}} RubberWindowFrame - 1084 682 759 496 0 0 1920 1178 + 625 382 759 496 0 0 1440 878 Module PBXNavigatorGroup @@ -746,14 +781,14 @@ XCBuildResultsTrigger_Collapse 1021 XCBuildResultsTrigger_Open - 1010 + 1011 GeometryConfiguration Frame {{0, 231}, {759, 224}} RubberWindowFrame - 1084 682 759 496 0 0 1920 1178 + 625 382 759 496 0 0 1440 878 Module PBXBuildResultsModule @@ -776,14 +811,14 @@ TableOfContents 21C6208410543D7D004D5948 - 218134F5105AEA9900A0AE18 + 2139CF3B105D985900FD961B 1CD0528F0623707200166675 XCMainBuildResultsModuleGUID ToolbarConfiguration xcode.toolbar.config.buildV3 WindowString - 1084 682 759 496 0 0 1920 1178 + 625 382 759 496 0 0 1440 878 WindowToolGUID 21C6208410543D7D004D5948 WindowToolIsVisible @@ -870,10 +905,10 @@ Frame {{381, 0}, {775, 325}} RubberWindowFrame - 691 429 1156 650 0 0 1920 1178 + 257 192 1156 650 0 0 1440 878 RubberWindowFrame - 691 429 1156 650 0 0 1920 1178 + 257 192 1156 650 0 0 1440 878 Module PBXDebugSessionModule @@ -896,18 +931,18 @@ TableOfContents 1CD10A99069EF8BA00B06720 - 218134FF105AEB4000A0AE18 + 2139CF3C105D985900FD961B 1C162984064C10D400B95A72 - 21813500105AEB4000A0AE18 - 21813501105AEB4000A0AE18 - 21813502105AEB4000A0AE18 - 21813503105AEB4000A0AE18 - 21813504105AEB4000A0AE18 + 2139CF3D105D985900FD961B + 2139CF3E105D985900FD961B + 2139CF3F105D985900FD961B + 2139CF40105D985900FD961B + 2139CF41105D985900FD961B ToolbarConfiguration xcode.toolbar.config.debugV3 WindowString - 691 429 1156 650 0 0 1920 1178 + 257 192 1156 650 0 0 1440 878 WindowToolGUID 1CD10A99069EF8BA00B06720 WindowToolIsVisible @@ -936,16 +971,16 @@ PBXProjectModuleGUID 1CDD528C0622207200134675 PBXProjectModuleLabel - Localizable.strings + LinkingEditor.m StatusBarVisibility GeometryConfiguration Frame - {{0, 0}, {1242, 561}} + {{0, 0}, {1242, 488}} RubberWindowFrame - 570 165 1242 929 0 0 1920 1178 + 187 64 1242 814 0 0 1440 878 Module PBXNavigatorGroup @@ -954,7 +989,7 @@ Proportion - 561pt + 488pt ContentConfiguration @@ -967,18 +1002,18 @@ GeometryConfiguration Frame - {{0, 566}, {1242, 322}} + {{0, 493}, {1242, 280}} RubberWindowFrame - 570 165 1242 929 0 0 1920 1178 + 187 64 1242 814 0 0 1440 878 Module PBXProjectFindModule Proportion - 322pt + 280pt Proportion - 888pt + 773pt Name @@ -992,13 +1027,13 @@ TableOfContents 1C530D57069F1CE1000CFCEE - 21813505105AEB4000A0AE18 - 21813506105AEB4000A0AE18 + 2139CF4E105D985900FD961B + 2139CF4F105D985900FD961B 1CDD528C0622207200134675 1CD0528E0623707200166675 WindowString - 570 165 1242 929 0 0 1920 1178 + 187 64 1242 814 0 0 1440 878 WindowToolGUID 1C530D57069F1CE1000CFCEE WindowToolIsVisible @@ -1023,8 +1058,6 @@ Dock - BecomeActive - ContentConfiguration PBXProjectModuleGUID @@ -1035,18 +1068,18 @@ GeometryConfiguration Frame - {{0, 0}, {856, 587}} + {{0, 0}, {928, 577}} RubberWindowFrame - 762 400 856 628 0 0 1920 1178 + 194 260 928 618 0 0 1440 878 Module PBXDebugCLIModule Proportion - 587pt + 577pt Proportion - 587pt + 577pt Name @@ -1060,13 +1093,13 @@ TableOfContents 1C78EAAD065D492600B07095 - 21813507105AEB4000A0AE18 + 2139CF50105D985900FD961B 1C78EAAC065D492600B07095 ToolbarConfiguration xcode.toolbar.config.consoleV3 WindowString - 762 400 856 628 0 0 1920 1178 + 194 260 928 618 0 0 1440 878 WindowToolGUID 1C78EAAD065D492600B07095 WindowToolIsVisible diff --git a/Notation.xcodeproj/scrod.pbxuser b/Notation.xcodeproj/scrod.pbxuser index 58f3b5d4..7539febe 100644 --- a/Notation.xcodeproj/scrod.pbxuser +++ b/Notation.xcodeproj/scrod.pbxuser @@ -2,11 +2,11 @@ { 089C165DFE840E0CC02AAC07 /* English */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1181, 529}}"; + sepNavIntBoundsRect = "{{0, 0}, {270, 70}}"; sepNavSelRange = "{82, 0}"; - sepNavVisRange = "{0, 138}"; + sepNavVisRange = "{0, 0}"; sepNavVisRect = "{{0, 0}, {992, 885}}"; - sepNavWindowFrame = "{{15, 9}, {1031, 1014}}"; + sepNavWindowFrame = "{{15, 64}, {1031, 814}}"; }; }; 210A10660B66720F005BE981 /* BookmarksTable.h */ = { @@ -19,9 +19,9 @@ }; 210A10670B66720F005BE981 /* BookmarksTable.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {168, 532}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{0, 0}"; + sepNavIntBoundsRect = "{{0, 0}, {1181, 518}}"; + sepNavSelRange = "{356, 14}"; + sepNavVisRange = "{0, 660}"; sepNavVisRect = "{{0, 42}, {718, 99}}"; sepNavWindowFrame = "{{420, 64}, {970, 814}}"; }; @@ -118,11 +118,11 @@ continueAfterActions = 0; countType = 0; delayBeforeContinue = 0; - hitCount = 1; + hitCount = 0; ignoreCount = 0; location = Foundation; - modificationTime = 200505483.316485; - state = 1; + modificationTime = 274567130.204633; + state = 0; symbolName = "-[NSException raise]"; }; 2114C0D00957570800614E74 /* Notational Velocity */ = { @@ -212,9 +212,9 @@ }; 2114C11509575BD400614E74 /* AppController.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1292, 17752}}"; - sepNavSelRange = "{22211, 0}"; - sepNavVisRange = "{20996, 2720}"; + sepNavIntBoundsRect = "{{0, 0}, {672, 18284}}"; + sepNavSelRange = "{28418, 14}"; + sepNavVisRange = "{0, 0}"; sepNavVisRect = "{{0, 15945}, {1000, 995}}"; sepNavWindowFrame = "{{375, 97}, {1351, 1081}}"; }; @@ -230,11 +230,11 @@ }; 2114C13E0957732800614E74 /* NotationController.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {984, 21882}}"; + sepNavIntBoundsRect = "{{0, 0}, {984, 21756}}"; sepNavSelRange = "{7099, 0}"; - sepNavVisRange = "{6095, 2728}"; + sepNavVisRange = "{6382, 1994}"; sepNavVisRect = "{{0, 17808}, {927, 898}}"; - sepNavWindowFrame = "{{574, 151}, {966, 1027}}"; + sepNavWindowFrame = "{{285, 64}, {966, 814}}"; }; }; 2114C1440957733200614E74 /* NoteObject.h */ = { @@ -275,11 +275,11 @@ }; 2114C25A095885C800614E74 /* English */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1181, 6580}}"; - sepNavSelRange = "{9305, 0}"; - sepNavVisRange = "{8628, 1496}"; + sepNavIntBoundsRect = "{{0, 0}, {1860, 6258}}"; + sepNavSelRange = "{16663, 0}"; + sepNavVisRange = "{0, 1591}"; sepNavVisRect = "{{0, 2894}, {1160, 752}}"; - sepNavWindowFrame = "{{208, 129}, {1199, 882}}"; + sepNavWindowFrame = "{{208, 64}, {1199, 814}}"; }; }; 2114C2860958CC9100614E74 /* pbkdf2.h */ = { @@ -362,21 +362,21 @@ }; 212B84600978422300F3597F /* NSString_NV.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {851, 686}}"; + sepNavIntBoundsRect = "{{0, 0}, {756, 714}}"; sepNavSelRange = "{101, 39}"; - sepNavVisRange = "{0, 1697}"; + sepNavVisRange = "{0, 0}"; sepNavVisRect = "{{0, 140}, {718, 99}}"; sepNavWindowFrame = "{{66, 95}, {910, 672}}"; }; }; 212B84610978422300F3597F /* NSString_NV.m */ = { uiCtxt = { - sepNavFolds = "{\n c = (\n {\n l = \"CFComparatorFunction comparator\";\n r = \"{6602, 35}\";\n s = 1;\n },\n {\n l = \"void * context\";\n r = \"{6638, 18}\";\n s = 1;\n }\n );\n r = \"{0, 23323}\";\n s = 0;\n}"; - sepNavIntBoundsRect = "{{0, 0}, {1572, 8764}}"; - sepNavSelRange = "{18549, 0}"; - sepNavVisRange = "{17661, 1676}"; + sepNavFolds = "{\n c = (\n {\n l = \"CFComparatorFunction comparator\";\n r = \"{6602, 35}\";\n s = 1;\n },\n {\n l = \"void * context\";\n r = \"{6638, 18}\";\n s = 1;\n }\n );\n r = \"{0, 23682}\";\n s = 0;\n}"; + sepNavIntBoundsRect = "{{0, 0}, {1062, 8890}}"; + sepNavSelRange = "{23329, 0}"; + sepNavVisRange = "{21826, 1805}"; sepNavVisRect = "{{0, 3436}, {989, 899}}"; - sepNavWindowFrame = "{{149, 150}, {1028, 1028}}"; + sepNavWindowFrame = "{{146, 64}, {1028, 814}}"; }; }; 212DCA450A6AD28700F74E46 /* EncodingsManager.h */ = { @@ -450,6 +450,97 @@ sepNavWindowFrame = "{{236, 64}, {517, 814}}"; }; }; + 2139CF51105D985D00FD961B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 089C165DFE840E0CC02AAC07 /* English */; + name = "InfoPlist.strings: 3"; + rLen = 0; + rLoc = 82; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 2139CF52105D985D00FD961B /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D1107310486CEB800E47090 /* Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + CFBundleGetInfoString, + ); + name = /Users/scrod/Projects/Notation/Info.plist; + rLen = 0; + rLoc = 2147483647; + }; + 2139CF53105D985D00FD961B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2114C11509575BD400614E74 /* AppController.m */; + rLen = 14; + rLoc = 28418; + rType = 0; + }; + 2139CF54105D985D00FD961B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 089C165DFE840E0CC02AAC07 /* English */; + name = "InfoPlist.strings: 3"; + rLen = 0; + rLoc = 82; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 2139CF55105D985D00FD961B /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D1107310486CEB800E47090 /* Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + CFBundleGetInfoString, + ); + name = /Users/scrod/Projects/Notation/Info.plist; + rLen = 0; + rLoc = 2147483647; + }; + 2139CF5B105D986E00FD961B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2114C11509575BD400614E74 /* AppController.m */; + name = "AppController.m: 716"; + rLen = 14; + rLoc = 28418; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 2139CF5C105D986E00FD961B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 219588D10961D7F200972B8C /* LinkingEditor.m */; + name = "LinkingEditor.m: 770"; + rLen = 0; + rLoc = 29121; + rType = 0; + vrLen = 1314; + vrLoc = 28397; + }; + 2139CF5D105D986E00FD961B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2114C13E0957732800614E74 /* NotationController.m */; + name = "NotationController.m: 246"; + rLen = 0; + rLoc = 7099; + rType = 0; + vrLen = 1994; + vrLoc = 6382; + }; + 2139CF5E105D986E00FD961B /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 217CEBA209E9885500DF0E09 /* NotationFileManager.m */; + name = "NotationFileManager.m: 167"; + rLen = 16; + rLoc = 5277; + rType = 0; + vrLen = 2001; + vrLoc = 4087; + }; 213FAD510B3C6B52004C74BD /* FSExchangeObjectsCompat.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {30, 210}}"; @@ -693,11 +784,11 @@ }; 217CEBA209E9885500DF0E09 /* NotationFileManager.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1085, 8036}}"; + sepNavIntBoundsRect = "{{0, 0}, {1085, 7952}}"; sepNavSelRange = "{5277, 16}"; - sepNavVisRange = "{3529, 2559}"; + sepNavVisRange = "{4087, 2001}"; sepNavVisRect = "{{0, 1987}, {1002, 483}}"; - sepNavWindowFrame = "{{301, 102}, {1144, 1021}}"; + sepNavWindowFrame = "{{115, 64}, {1144, 814}}"; }; }; 217D02D30B77061E0004E02D /* BodyScroller.h */ = { @@ -784,30 +875,6 @@ sepNavWindowFrame = "{{389, 4}, {1197, 1024}}"; }; }; - 218134E0105AEA8500A0AE18 /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 214C6C58105445410085D386 /* Notality.icns */; - }; - 218134E4105AEA8500A0AE18 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2114C13E0957732800614E74 /* NotationController.m */; - name = "NotationController.m: 246"; - rLen = 0; - rLoc = 7099; - rType = 0; - vrLen = 2733; - vrLoc = 6095; - }; - 218134E5105AEA8500A0AE18 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 217CEBA209E9885500DF0E09 /* NotationFileManager.m */; - name = "NotationFileManager.m: 167"; - rLen = 16; - rLoc = 5277; - rType = 0; - vrLen = 2559; - vrLoc = 3529; - }; 21813561105AF27400A0AE18 /* Acknowledgements.txt */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1292, 3878}}"; @@ -816,30 +883,6 @@ sepNavWindowFrame = "{{15, 92}, {1351, 1081}}"; }; }; - 2181356F105B04BE00A0AE18 /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 214C6C58105445410085D386 /* Notality.icns */; - }; - 21813570105B04BE00A0AE18 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2114C13E0957732800614E74 /* NotationController.m */; - name = "NotationController.m: 246"; - rLen = 0; - rLoc = 7099; - rType = 0; - vrLen = 2728; - vrLoc = 6095; - }; - 21813571105B04BE00A0AE18 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 217CEBA209E9885500DF0E09 /* NotationFileManager.m */; - name = "NotationFileManager.m: 167"; - rLen = 16; - rLoc = 5277; - rType = 0; - vrLen = 2559; - vrLoc = 3529; - }; 2191858309BEAB6400586B15 /* RBSplitSubview.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {12, 1442}}"; @@ -910,8 +953,9 @@ }; 219190F009C4A60700586B15 /* DualField.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1002, 4396}}"; - sepNavSelRange = "{3625, 13}"; + sepNavIntBoundsRect = "{{0, 0}, {1181, 4550}}"; + sepNavSelRange = "{6316, 7}"; + sepNavVisRange = "{6118, 1124}"; sepNavVisRect = "{{0, 1362}, {1002, 483}}"; sepNavWindowFrame = "{{453, 54}, {947, 1028}}"; }; @@ -942,10 +986,11 @@ }; 2191930209CFBEBD00586B15 /* NotesTableView.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {899, 11130}}"; - sepNavSelRange = "{1236, 0}"; + sepNavIntBoundsRect = "{{0, 0}, {879, 10752}}"; + sepNavSelRange = "{248, 0}"; + sepNavVisRange = "{0, 2245}"; sepNavVisRect = "{{0, 977}, {899, 899}}"; - sepNavWindowFrame = "{{330, 150}, {938, 1028}}"; + sepNavWindowFrame = "{{330, 64}, {938, 814}}"; }; }; 2191982009D607C600586B15 /* PrefsWindowController.h */ = { @@ -974,11 +1019,11 @@ }; 219588D10961D7F200972B8C /* LinkingEditor.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {162, 15540}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{0, 0}"; + sepNavIntBoundsRect = "{{0, 0}, {1458, 15568}}"; + sepNavSelRange = "{29121, 0}"; + sepNavVisRange = "{28397, 1314}"; sepNavVisRect = "{{0, 12943}, {718, 341}}"; - sepNavWindowFrame = "{{293, 64}, {987, 814}}"; + sepNavWindowFrame = "{{318, 64}, {987, 814}}"; }; }; 219739F90AFE42A10046683E /* PassphraseRetriever.h */ = { @@ -1009,9 +1054,9 @@ }; 219FD3150B2CC655004E132B /* LinkingEditor_Indentation.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {24, 3024}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{0, 0}"; + sepNavIntBoundsRect = "{{0, 0}, {1181, 2982}}"; + sepNavSelRange = "{3104, 17}"; + sepNavVisRange = "{2272, 1596}"; sepNavVisRect = "{{0, 644}, {718, 99}}"; sepNavWindowFrame = "{{65, 64}, {1114, 814}}"; }; @@ -1116,6 +1161,118 @@ sepNavWindowFrame = "{{972, -39}, {967, 1011}}"; }; }; + 21B5447D105D7963002097C4 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 214C6C58105445410085D386 /* Notality.icns */; + }; + 21B5447F105D7963002097C4 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 214C6C58105445410085D386 /* Notality.icns */; + }; + 21B544CA105D8FAB002097C4 /* -[NSException raise] */ = { + isa = PBXSymbolicBreakpoint; + actions = ( + ); + breakpointStyle = 1; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + hitCount = 0; + ignoreCount = 0; + location = CoreFoundation; + modificationTime = 274567129.6697; + state = 1; + symbolName = "-[NSException raise]"; + }; + 21B544CB105D8FAC002097C4 /* -[NSException raise] */ = { + isa = PBXSymbolicBreakpoint; + actions = ( + ); + breakpointStyle = 1; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + hitCount = 0; + ignoreCount = 0; + location = CoreFoundation; + modificationTime = 274567129.669704; + state = 1; + symbolName = "-[NSException raise]"; + }; + 21B544DA105D8FE0002097C4 /* -[NSException raise] */ = { + isa = PBXSymbolicBreakpoint; + breakpointStyle = 1; + continueAfterActions = 0; + countType = 0; + delayBeforeContinue = 0; + hitCount = 0; + ignoreCount = 0; + modificationTime = 274567136.814744; + state = 1; + symbolName = "-[NSException raise]"; + }; + 21B54535105D953C002097C4 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 217CEBA209E9885500DF0E09 /* NotationFileManager.m */; + name = "NotationFileManager.m: 216"; + rLen = 18; + rLoc = 7028; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 21B54536105D953C002097C4 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 219588D10961D7F200972B8C /* LinkingEditor.m */; + name = "LinkingEditor.m: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 21B54537105D953C002097C4 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 212B84600978422300F3597F /* NSString_NV.h */; + name = "NSString_NV.h: 6"; + rLen = 39; + rLoc = 101; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 21B5453A105D953C002097C4 /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D1107310486CEB800E47090 /* Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + CFBundleGetInfoString, + ); + name = /Users/scrod/Projects/Notation/Info.plist; + rLen = 0; + rLoc = 2147483647; + }; + 21B5453B105D953C002097C4 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 217CEBA209E9885500DF0E09 /* NotationFileManager.m */; + name = "NotationFileManager.m: 216"; + rLen = 18; + rLoc = 7028; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; + 21B5453D105D953C002097C4 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 212B84600978422300F3597F /* NSString_NV.h */; + name = "NSString_NV.h: 6"; + rLen = 39; + rLoc = 101; + rType = 0; + vrLen = 0; + vrLoc = 0; + }; 21C61FAB10542D40004D5948 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 213FAD510B3C6B52004C74BD /* FSExchangeObjectsCompat.h */; @@ -1296,16 +1453,6 @@ vrLen = 0; vrLoc = 0; }; - 21C6206310543D7D004D5948 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 219588D10961D7F200972B8C /* LinkingEditor.m */; - name = "LinkingEditor.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 0; - vrLoc = 0; - }; 21C6206410543D7D004D5948 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2155DEA4097B5F0300163A10 /* BufferUtils.h */; @@ -1605,6 +1752,36 @@ sepNavWindowFrame = "{{307, 0}, {1176, 1028}}"; }; }; + 21C8157C105D9679006479FC /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 219588D10961D7F200972B8C /* LinkingEditor.m */; + name = "LinkingEditor.m: 770"; + rLen = 0; + rLoc = 29121; + rType = 0; + vrLen = 1314; + vrLoc = 28397; + }; + 21C8157D105D9679006479FC /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2114C13E0957732800614E74 /* NotationController.m */; + name = "NotationController.m: 246"; + rLen = 0; + rLoc = 7099; + rType = 0; + vrLen = 1994; + vrLoc = 6382; + }; + 21C8157E105D9679006479FC /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 217CEBA209E9885500DF0E09 /* NotationFileManager.m */; + name = "NotationFileManager.m: 167"; + rLen = 16; + rLoc = 5277; + rType = 0; + vrLen = 2067; + vrLoc = 4021; + }; 21D60126098FDB46007440DF /* GlobalPrefs.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {663, 1974}}"; @@ -1615,11 +1792,11 @@ }; 21D60127098FDB46007440DF /* GlobalPrefs.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {825, 8904}}"; - sepNavSelRange = "{3378, 0}"; - sepNavVisRange = "{2657, 2449}"; + sepNavIntBoundsRect = "{{0, 0}, {882, 9156}}"; + sepNavSelRange = "{9913, 0}"; + sepNavVisRange = "{9630, 1440}"; sepNavVisRect = "{{0, 753}, {845, 895}}"; - sepNavWindowFrame = "{{383, 76}, {884, 1024}}"; + sepNavWindowFrame = "{{377, 64}, {884, 814}}"; }; }; 21DC788D097894B600E59B09 /* NSCollection_utils.h */ = { @@ -1773,6 +1950,9 @@ ); breakpoints = ( 211346430B35F7D70081B064 /* -[NSException raise] */, + 21B544CA105D8FAB002097C4 /* -[NSException raise] */, + 21B544CB105D8FAC002097C4 /* -[NSException raise] */, + 21B544DA105D8FE0002097C4 /* -[NSException raise] */, ); codeSenseManager = 2114C0DA0957570F00614E74 /* Code sense */; executables = ( @@ -1939,19 +2119,30 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 274393735; - PBXWorkspaceStateSaveDate = 274393735; + PBXPerProjectTemplateStateSaveDate = 274568937; + PBXWorkspaceStateSaveDate = 274568937; }; perUserProjectItems = { + 2139CF51105D985D00FD961B /* PBXTextBookmark */ = 2139CF51105D985D00FD961B /* PBXTextBookmark */; + 2139CF52105D985D00FD961B /* PlistBookmark */ = 2139CF52105D985D00FD961B /* PlistBookmark */; + 2139CF53105D985D00FD961B /* PBXTextBookmark */ = 2139CF53105D985D00FD961B /* PBXTextBookmark */; + 2139CF54105D985D00FD961B /* PBXTextBookmark */ = 2139CF54105D985D00FD961B /* PBXTextBookmark */; + 2139CF55105D985D00FD961B /* PlistBookmark */ = 2139CF55105D985D00FD961B /* PlistBookmark */; + 2139CF5B105D986E00FD961B /* PBXTextBookmark */ = 2139CF5B105D986E00FD961B /* PBXTextBookmark */; + 2139CF5C105D986E00FD961B /* PBXTextBookmark */ = 2139CF5C105D986E00FD961B /* PBXTextBookmark */; + 2139CF5D105D986E00FD961B /* PBXTextBookmark */ = 2139CF5D105D986E00FD961B /* PBXTextBookmark */; + 2139CF5E105D986E00FD961B /* PBXTextBookmark */ = 2139CF5E105D986E00FD961B /* PBXTextBookmark */; 214C6C641054454C0085D386 /* PlistBookmark */ = 214C6C641054454C0085D386 /* PlistBookmark */; 214C6C651054454C0085D386 /* PBXBookmark */ = 214C6C651054454C0085D386 /* PBXBookmark */; 214C6C681054454C0085D386 /* PBXBookmark */ = 214C6C681054454C0085D386 /* PBXBookmark */; - 218134E0105AEA8500A0AE18 /* PBXBookmark */ = 218134E0105AEA8500A0AE18 /* PBXBookmark */; - 218134E4105AEA8500A0AE18 /* PBXTextBookmark */ = 218134E4105AEA8500A0AE18 /* PBXTextBookmark */; - 218134E5105AEA8500A0AE18 /* PBXTextBookmark */ = 218134E5105AEA8500A0AE18 /* PBXTextBookmark */; - 2181356F105B04BE00A0AE18 /* PBXBookmark */ = 2181356F105B04BE00A0AE18 /* PBXBookmark */; - 21813570105B04BE00A0AE18 /* PBXTextBookmark */ = 21813570105B04BE00A0AE18 /* PBXTextBookmark */; - 21813571105B04BE00A0AE18 /* PBXTextBookmark */ = 21813571105B04BE00A0AE18 /* PBXTextBookmark */; + 21B5447D105D7963002097C4 /* PBXBookmark */ = 21B5447D105D7963002097C4 /* PBXBookmark */; + 21B5447F105D7963002097C4 /* PBXBookmark */ = 21B5447F105D7963002097C4 /* PBXBookmark */; + 21B54535105D953C002097C4 /* PBXTextBookmark */ = 21B54535105D953C002097C4 /* PBXTextBookmark */; + 21B54536105D953C002097C4 /* PBXTextBookmark */ = 21B54536105D953C002097C4 /* PBXTextBookmark */; + 21B54537105D953C002097C4 /* PBXTextBookmark */ = 21B54537105D953C002097C4 /* PBXTextBookmark */; + 21B5453A105D953C002097C4 /* PlistBookmark */ = 21B5453A105D953C002097C4 /* PlistBookmark */; + 21B5453B105D953C002097C4 /* PBXTextBookmark */ = 21B5453B105D953C002097C4 /* PBXTextBookmark */; + 21B5453D105D953C002097C4 /* PBXTextBookmark */ = 21B5453D105D953C002097C4 /* PBXTextBookmark */; 21C61FAB10542D40004D5948 /* PBXTextBookmark */ = 21C61FAB10542D40004D5948 /* PBXTextBookmark */; 21C61FAC10542D40004D5948 /* PBXTextBookmark */ = 21C61FAC10542D40004D5948 /* PBXTextBookmark */; 21C61FAD10542D40004D5948 /* PBXTextBookmark */ = 21C61FAD10542D40004D5948 /* PBXTextBookmark */; @@ -1970,7 +2161,6 @@ 21C61FF210542FB9004D5948 /* PBXTextBookmark */ = 21C61FF210542FB9004D5948 /* PBXTextBookmark */; 21C6200B10542FD1004D5948 /* PBXTextBookmark */ = 21C6200B10542FD1004D5948 /* PBXTextBookmark */; 21C620151054311C004D5948 /* PBXTextBookmark */ = 21C620151054311C004D5948 /* PBXTextBookmark */; - 21C6206310543D7D004D5948 /* PBXTextBookmark */ = 21C6206310543D7D004D5948 /* PBXTextBookmark */; 21C6206410543D7D004D5948 /* PBXTextBookmark */ = 21C6206410543D7D004D5948 /* PBXTextBookmark */; 21C6206510543D7D004D5948 /* PBXTextBookmark */ = 21C6206510543D7D004D5948 /* PBXTextBookmark */; 21C6206610543D7D004D5948 /* PBXTextBookmark */ = 21C6206610543D7D004D5948 /* PBXTextBookmark */; @@ -1999,6 +2189,9 @@ 21C6207F10543D7D004D5948 /* PBXTextBookmark */ = 21C6207F10543D7D004D5948 /* PBXTextBookmark */; 21C6208010543D7D004D5948 /* PlistBookmark */ = 21C6208010543D7D004D5948 /* PlistBookmark */; 21C6208110543D7D004D5948 /* PBXTextBookmark */ = 21C6208110543D7D004D5948 /* PBXTextBookmark */; + 21C8157C105D9679006479FC /* PBXTextBookmark */ = 21C8157C105D9679006479FC /* PBXTextBookmark */; + 21C8157D105D9679006479FC /* PBXTextBookmark */ = 21C8157D105D9679006479FC /* PBXTextBookmark */; + 21C8157E105D9679006479FC /* PBXTextBookmark */ = 21C8157E105D9679006479FC /* PBXTextBookmark */; }; sourceControlManager = 2114C0D90957570F00614E74 /* Source Control */; userBookmarkGroup = 215826490B72482B00711663 /* PBXBookmarkGroup */; diff --git a/NotesTableView.m b/NotesTableView.m index 5132838b..58b8b7ac 100644 --- a/NotesTableView.m +++ b/NotesTableView.m @@ -6,6 +6,7 @@ #import "NoteObject.h" #import "NSCollection_utils.h" #import "HeaderViewWithMenu.h" +#import "NSString_NV.h" #define STATUS_STRING_FONT_SIZE 16.0f @@ -589,7 +590,7 @@ - (void)mouseDown:(NSEvent*)event { - (void)keyDown:(NSEvent*)theEvent { - unichar keyChar = [[theEvent characters] characterAtIndex:0]; + unichar keyChar = [theEvent firstCharacter]; if (keyChar == NSNewlineCharacter || keyChar == NSCarriageReturnCharacter || keyChar == NSEnterCharacter) { unsigned int sel = [self selectedRow]; @@ -673,7 +674,7 @@ - (BOOL)performKeyEquivalent:(NSEvent *)theEvent { unsigned mods = [theEvent modifierFlags]; if (mods & NSCommandKeyMask) { - unichar keyChar = [[theEvent charactersIgnoringModifiers] characterAtIndex:0]; + unichar keyChar = [theEvent firstCharacterIgnoringModifiers]; if (keyChar == kNext_Tag || keyChar == kPrev_Tag) {