From 00ac602d8ca381ce2086b3aa10ca21861e61aa6a Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 15 Sep 2010 13:58:10 +0000 Subject: =?UTF-8?q?=E2=80=A2=C2=A0some=20further=20bit=20field=20editing?= =?UTF-8?q?=20preparations=20=E2=80=A2=20re-enabled=20length=20checking=20?= =?UTF-8?q?while=20editing=20in=20FieldEditorSheet=20=E2=80=A2=20FieldEdit?= =?UTF-8?q?orSheet=20now=20shows=20field=20type=20declaration=20=E2=80=A2?= =?UTF-8?q?=20some=20preparations=20for=20BINARY=20editing=20in=20FieldEdi?= =?UTF-8?q?torSheet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Interfaces/English.lproj/FieldEditorSheet.xib | 3831 +++++++++++++++++++++++-- Source/SPDataCellFormatter.h | 2 + Source/SPDataCellFormatter.m | 25 +- Source/SPFieldEditorController.h | 99 +- Source/SPFieldEditorController.m | 491 ++-- Source/SPTableContent.m | 43 +- 6 files changed, 3963 insertions(+), 528 deletions(-) diff --git a/Interfaces/English.lproj/FieldEditorSheet.xib b/Interfaces/English.lproj/FieldEditorSheet.xib index eb7ea20d..07dcbe45 100644 --- a/Interfaces/English.lproj/FieldEditorSheet.xib +++ b/Interfaces/English.lproj/FieldEditorSheet.xib @@ -12,8 +12,8 @@ YES - + YES @@ -668,12 +668,12 @@ - 7 + 1 2 {{196, 292}, {411, 218}} 544735232 - Window - NSWindow + BIT Editor + NSPanel {411, 218} {411, 218} @@ -685,11 +685,12 @@ 268 - {{292, 157}, {18, 24}} + {{296, 157}, {10, 24}} + 39 YES - -2080244224 + 67239424 134479872 @@ -717,9 +718,9 @@ 268 - {{303, 157}, {18, 24}} + {{307, 157}, {10, 24}} - 6 + 38 YES 67239424 @@ -740,9 +741,9 @@ 268 - {{314, 157}, {18, 24}} + {{318, 157}, {10, 24}} - 5 + 37 YES 67239424 @@ -763,9 +764,9 @@ 268 - {{325, 157}, {18, 24}} + {{329, 157}, {10, 24}} - 4 + 36 YES 67239424 @@ -786,9 +787,9 @@ 268 - {{338, 157}, {18, 24}} + {{342, 157}, {10, 24}} - 3 + 35 YES 67239424 @@ -809,9 +810,9 @@ 268 - {{349, 157}, {18, 24}} + {{353, 157}, {10, 24}} - 2 + 34 YES 67239424 @@ -832,11 +833,12 @@ 268 - {{360, 157}, {18, 24}} + {{364, 157}, {10, 24}} + 33 YES - -2080244224 + 67239424 134479872 @@ -855,13 +857,14 @@ 268 - {{371, 157}, {18, 24}} + {{375, 157}, {10, 24}} + 32 YES 67239424 134479872 - 0 + 1209815551 @@ -877,9 +880,9 @@ 268 - {{246, 157}, {18, 24}} + {{250, 157}, {10, 24}} - 3 + 43 YES 67239424 @@ -900,9 +903,9 @@ 268 - {{257, 157}, {18, 24}} + {{261, 157}, {10, 24}} - 2 + 42 YES 67239424 @@ -923,11 +926,12 @@ 268 - {{268, 157}, {18, 24}} + {{272, 157}, {10, 24}} + 41 YES - -2080244224 + 67239424 134479872 @@ -946,13 +950,14 @@ 268 - {{279, 157}, {18, 24}} + {{283, 157}, {10, 24}} + 40 YES 67239424 134479872 - 8 + 1209815551 @@ -968,9 +973,9 @@ 268 - {{200, 157}, {18, 24}} + {{204, 157}, {10, 24}} - 3 + 47 YES 67239424 @@ -991,9 +996,9 @@ 268 - {{211, 157}, {18, 24}} + {{215, 157}, {10, 24}} - 2 + 46 YES 67239424 @@ -1014,11 +1019,12 @@ 268 - {{222, 157}, {18, 24}} + {{226, 157}, {10, 24}} + 45 YES - -2080244224 + 67239424 134479872 @@ -1037,8 +1043,9 @@ 268 - {{233, 157}, {18, 24}} + {{237, 157}, {10, 24}} + 44 YES 67239424 @@ -1059,9 +1066,9 @@ 268 - {{154, 157}, {18, 24}} + {{158, 157}, {10, 24}} - 3 + 51 YES 67239424 @@ -1082,9 +1089,9 @@ 268 - {{165, 157}, {18, 24}} + {{169, 157}, {10, 24}} - 2 + 50 YES 67239424 @@ -1105,11 +1112,12 @@ 268 - {{176, 157}, {18, 24}} + {{180, 157}, {10, 24}} + 49 YES - -2080244224 + 67239424 134479872 @@ -1128,13 +1136,14 @@ 268 - {{187, 157}, {18, 24}} + {{191, 157}, {10, 24}} + 48 YES 67239424 134479872 - 16 + 1209815551 @@ -1150,9 +1159,9 @@ 268 - {{108, 157}, {18, 24}} + {{112, 157}, {10, 24}} - 3 + 55 YES 67239424 @@ -1173,9 +1182,9 @@ 268 - {{119, 157}, {18, 24}} + {{123, 157}, {10, 24}} - 2 + 54 YES 67239424 @@ -1196,11 +1205,12 @@ 268 - {{130, 157}, {18, 24}} + {{134, 157}, {10, 24}} + 53 YES - -2080244224 + 67239424 134479872 @@ -1219,8 +1229,9 @@ 268 - {{141, 157}, {18, 24}} + {{145, 157}, {10, 24}} + 52 YES 67239424 @@ -1241,9 +1252,9 @@ 268 - {{62, 157}, {18, 24}} + {{66, 157}, {10, 24}} - 3 + 59 YES 67239424 @@ -1264,9 +1275,9 @@ 268 - {{73, 157}, {18, 24}} + {{77, 157}, {10, 24}} - 2 + 58 YES 67239424 @@ -1287,11 +1298,12 @@ 268 - {{84, 157}, {18, 24}} + {{88, 157}, {10, 24}} + 57 YES - -2080244224 + 67239424 134479872 @@ -1310,13 +1322,14 @@ 268 - {{95, 157}, {18, 24}} + {{99, 157}, {10, 24}} + 56 YES 67239424 134479872 - 24 + 1209815551 @@ -1332,9 +1345,9 @@ 268 - {{16, 157}, {18, 24}} + {{20, 157}, {10, 24}} - 3 + 63 YES 67239424 @@ -1355,9 +1368,9 @@ 268 - {{27, 157}, {18, 24}} + {{31, 157}, {10, 24}} - 2 + 62 YES 67239424 @@ -1378,11 +1391,12 @@ 268 - {{38, 157}, {18, 24}} + {{42, 157}, {10, 24}} + 61 YES - -2080244224 + 67239424 134479872 @@ -1401,8 +1415,9 @@ 268 - {{49, 157}, {18, 24}} + {{53, 157}, {10, 24}} + 60 YES 67239424 @@ -1423,11 +1438,12 @@ 268 - {{292, 129}, {18, 24}} + {{296, 129}, {10, 24}} + 7 YES - -2080244224 + 67239424 134479872 @@ -1446,7 +1462,7 @@ 268 - {{303, 129}, {18, 24}} + {{307, 129}, {10, 24}} 6 YES @@ -1469,7 +1485,7 @@ 268 - {{314, 129}, {18, 24}} + {{318, 129}, {10, 24}} 5 YES @@ -1492,7 +1508,7 @@ 268 - {{325, 129}, {18, 24}} + {{329, 129}, {10, 24}} 4 YES @@ -1515,7 +1531,7 @@ 268 - {{338, 129}, {18, 24}} + {{342, 129}, {10, 24}} 3 YES @@ -1538,7 +1554,7 @@ 268 - {{349, 129}, {18, 24}} + {{353, 129}, {10, 24}} 2 YES @@ -1561,11 +1577,12 @@ 268 - {{360, 129}, {18, 24}} + {{364, 129}, {10, 24}} + 1 YES - -2080244224 + 67239424 134479872 @@ -1584,13 +1601,13 @@ 268 - {{371, 129}, {18, 24}} + {{375, 129}, {10, 24}} YES 67239424 134479872 - 32 + 1209815551 @@ -1606,9 +1623,9 @@ 268 - {{246, 129}, {18, 24}} + {{250, 129}, {10, 24}} - 3 + 11 YES 67239424 @@ -1629,9 +1646,9 @@ 268 - {{257, 129}, {18, 24}} + {{261, 129}, {10, 24}} - 2 + 10 YES 67239424 @@ -1652,11 +1669,12 @@ 268 - {{268, 129}, {18, 24}} + {{272, 129}, {10, 24}} + 9 YES - -2080244224 + 67239424 134479872 @@ -1675,13 +1693,14 @@ 268 - {{279, 129}, {18, 24}} + {{283, 129}, {10, 24}} + 8 YES 67239424 134479872 - 40 + 1209815551 @@ -1697,9 +1716,9 @@ 268 - {{200, 129}, {18, 24}} + {{204, 129}, {10, 24}} - 3 + 15 YES 67239424 @@ -1720,9 +1739,9 @@ 268 - {{211, 129}, {18, 24}} + {{215, 129}, {10, 24}} - 2 + 14 YES 67239424 @@ -1743,11 +1762,12 @@ 268 - {{222, 129}, {18, 24}} + {{226, 129}, {10, 24}} + 13 YES - -2080244224 + 67239424 134479872 @@ -1766,8 +1786,9 @@ 268 - {{233, 129}, {18, 24}} + {{237, 129}, {10, 24}} + 12 YES 67239424 @@ -1788,9 +1809,9 @@ 268 - {{154, 129}, {18, 24}} + {{158, 129}, {10, 24}} - 3 + 19 YES 67239424 @@ -1811,9 +1832,9 @@ 268 - {{165, 129}, {18, 24}} + {{169, 129}, {10, 24}} - 2 + 18 YES 67239424 @@ -1834,11 +1855,12 @@ 268 - {{176, 129}, {18, 24}} + {{180, 129}, {10, 24}} + 17 YES - -2080244224 + 67239424 134479872 @@ -1857,13 +1879,14 @@ 268 - {{187, 129}, {18, 24}} + {{191, 129}, {10, 24}} + 16 YES 67239424 134479872 - 48 + 1209815551 @@ -1879,9 +1902,9 @@ 268 - {{108, 129}, {18, 24}} + {{112, 129}, {10, 24}} - 3 + 23 YES 67239424 @@ -1902,9 +1925,9 @@ 268 - {{119, 129}, {18, 24}} + {{123, 129}, {10, 24}} - 2 + 22 YES 67239424 @@ -1925,11 +1948,12 @@ 268 - {{130, 129}, {18, 24}} + {{134, 129}, {10, 24}} + 21 YES - -2080244224 + 67239424 134479872 @@ -1948,8 +1972,9 @@ 268 - {{141, 129}, {18, 24}} + {{145, 129}, {10, 24}} + 20 YES 67239424 @@ -1970,9 +1995,9 @@ 268 - {{62, 129}, {18, 24}} + {{66, 129}, {10, 24}} - 3 + 27 YES 67239424 @@ -1993,9 +2018,9 @@ 268 - {{73, 129}, {18, 24}} + {{77, 129}, {10, 24}} - 2 + 26 YES 67239424 @@ -2016,11 +2041,12 @@ 268 - {{84, 129}, {18, 24}} + {{88, 129}, {10, 24}} + 25 YES - -2080244224 + 67239424 134479872 @@ -2039,13 +2065,14 @@ 268 - {{95, 129}, {18, 24}} + {{99, 129}, {10, 24}} + 24 YES 67239424 134479872 - 56 + 1209815551 @@ -2061,9 +2088,9 @@ 268 - {{16, 129}, {18, 24}} + {{20, 129}, {10, 24}} - 3 + 31 YES 67239424 @@ -2084,9 +2111,9 @@ 268 - {{27, 129}, {18, 24}} + {{31, 129}, {10, 24}} - 2 + 30 YES 67239424 @@ -2107,11 +2134,12 @@ 268 - {{38, 129}, {18, 24}} + {{42, 129}, {10, 24}} + 29 YES - -2080244224 + 67239424 134479872 @@ -2130,8 +2158,9 @@ 268 - {{49, 129}, {18, 24}} + {{53, 129}, {10, 24}} + 28 YES 67239424 @@ -2167,7 +2196,7 @@ 35 - Gw + DQ 200 25 @@ -2357,265 +2386,2467 @@ 0 NO - + 268 - {{367, 94}, {24, 24}} + {{412, 92}, {96, 32}} YES - + 67239424 134217728 - + Button_Dummy_Hex - - -2033958657 - 134 - - NSImage - selectall - + + -2038284033 + 268435585 - - 400 - 75 + h + 200 + 25 - + 268 - {{344, 94}, {24, 24}} + {{412, 71}, {96, 32}} YES - + 67239424 134217728 - + Button_Dummy_Int - - -2033958657 - 134 - - NSImage - selectnone - + + -2038284033 + 268435585 - + i + 200 + 25 + + + + + 268 + {{412, 50}, {96, 32}} + + YES + + 67239424 + 134217728 + Button_Dummy_Oct + + + -2038284033 + 268435585 + + o + 200 + 25 + + + + + 268 + {{416, 32}, {96, 32}} + + YES + + 67239424 + 134217728 + Button_Bit1 + + + -2038284033 + 268435585 + + b + 200 + 25 + + + + + 268 + {{367, 142}, {27, 11}} + + YES + + 68288064 + 138675200 + 0 + + + + + + + + + 268 + {{275, 142}, {27, 11}} + + YES + + 68288064 + 138675200 + 8 + + + + + + + + + 268 + {{183, 142}, {27, 11}} + + YES + + 68288064 + 138675200 + 16 + + + + + + + + + 268 + {{91, 142}, {27, 11}} + + YES + + 68288064 + 138675200 + 24 + + + + + + + + + 268 + {{367, 171}, {27, 11}} + + YES + + 68288064 + 138675200 + 32 + + + + + + + + + 268 + {{275, 171}, {27, 11}} + + YES + + 68288064 + 138675200 + 40 + + + + + + + + + 268 + {{183, 171}, {27, 11}} + + YES + + 68288064 + 138675200 + 48 + + + + + + + + + 268 + {{91, 171}, {27, 11}} + + YES + + 68288064 + 138675200 + 56 + + + + + + + + + 268 + {{230, 103}, {39, 15}} + + YES + + -2080244224 + 134479872 + 1 + + + -2038152961 + 268435619 + + 1 400 75 - - {411, 218} - - - {{0, 0}, {1920, 1058}} - {411, 240} - {411, 240} - - - - - YES - - - closeEditSheet: - - - - 40 - - - - closeEditSheet: - - - - 41 - - - - saveEditSheet: - - - - 42 - - - - openEditSheet: - - - - 43 - - - - segmentControllerChanged: - - - - 44 - - - - editSheetProgressBar - - - + + + 268 + {{322, 103}, {39, 15}} + + 4 + YES + + -2080244224 + 134479872 + >> + + + -2038152961 + 268435619 + + r + 400 + 75 + + + + + 268 + {{276, 103}, {39, 15}} + + 3 + YES + + -2080244224 + 134479872 + << + + + -2038152961 + 268435619 + + l + 400 + 75 + + + + + 268 + {{230, 85}, {39, 15}} + + 1 + YES + + -2080244224 + 134479872 + 0 + + + -2038152961 + 268435619 + + 0 + 400 + 75 + + + + + 268 + {{230, 67}, {39, 15}} + + 2 + YES + + -2080244224 + 134479872 + + + + -2038152961 + 268435619 + + n + 400 + 75 + + + + + 268 + {{322, 85}, {39, 15}} + + 6 + YES + + -2080244224 + 134479872 + >>+ + + + -2038152961 + 268435619 + + R + 400 + 75 + + + + + 268 + {{276, 85}, {39, 15}} + + 5 + YES + + -2080244224 + 134479872 + +<< + + + -2038152961 + 268435619 + + L + 400 + 75 + + + + {411, 218} + + + {{0, 0}, {1920, 1058}} + {411, 240} + {411, 240} + + + + + YES + + + closeEditSheet: + + + + 40 + + + + closeEditSheet: + + + + 41 + + + + saveEditSheet: + + + + 42 + + + + openEditSheet: + + + + 43 + + + + segmentControllerChanged: + + + + 44 + + + + editSheetProgressBar + + + 51 - editTextView + editTextView + + + + 52 + + + + editTextScrollView + + + + 53 + + + + hexTextView + + + + 54 + + + + hexTextScrollView + + + + 55 + + + + editImage + + + + 56 + + + + editSheetQuickLookButton + + + + 57 + + + + dropImage: + + + + 58 + + + + delegate + + + + 59 + + + + delegate + + + + 60 + + + + editSheetSegmentControl + + + + 61 + + + + delegate + + + + 62 + + + + editSheet + + + + 63 + + + + editSheetOkButton + + + + 67 + + + + editSheetCancelButton + + + + 68 + + + + editSheetOpenButton + + + + 69 + + + + window + + + + 70 + + + + editSheetFieldName + + + + 75 + + + + editSheetIsNotEditableCancelButton + + + + 78 + + + + closeEditSheet: + + + + 79 + + + + initialFirstResponder + + + + 235 + + + + nextKeyView + + + + 236 + + + + nextKeyView + + + + 237 + + + + nextKeyView + + + + 238 + + + + nextKeyView + + + + 239 + + + + selectText: + + + + 252 + + + + selectText: + + + + 253 + + + + selectText: + + + + 254 + + + + nextKeyView + + + + 255 + + + + nextKeyView + + + + 256 + + + + nextKeyView + + + + 257 + + + + nextKeyView + + + + 258 + + + + nextKeyView + + + + 259 + + + + nextKeyView + + + + 260 + + + + nextKeyView + + + + 261 + + + + nextKeyView + + + + 262 + + + + nextKeyView + + + + 263 + + + + nextKeyView + + + + 264 + + + + nextKeyView + + + + 265 + + + + nextKeyView + + + + 266 + + + + nextKeyView + + + + 267 + + + + nextKeyView + + + + 268 + + + + nextKeyView + + + + 269 + + + + nextKeyView + + + + 270 + + + + nextKeyView + + + + 271 + + + + nextKeyView + + + + 272 + + + + nextKeyView + + + + 273 + + + + nextKeyView + + + + 275 + + + + nextKeyView + + + + 276 + + + + nextKeyView + + + + 277 + + + + nextKeyView + + + + 278 + + + + nextKeyView + + + + 279 + + + + nextKeyView + + + + 280 + + + + nextKeyView + + + + 281 + + + + nextKeyView + + + + 282 + + + + nextKeyView + + + + 283 + + + + nextKeyView + + + + 284 + + + + nextKeyView + + + + 285 + + + + nextKeyView + + + + 286 + + + + nextKeyView + + + + 287 + + + + nextKeyView + + + + 288 + + + + nextKeyView + + + + 289 + + + + nextKeyView + + + + 290 + + + + nextKeyView + + + + 291 + + + + nextKeyView + + + + 292 + + + + nextKeyView + + + + 293 + + + + nextKeyView + + + + 294 + + + + nextKeyView + + + + 295 + + + + nextKeyView + + + + 296 + + + + nextKeyView + + + + 297 + + + + nextKeyView + + + + 298 + + + + nextKeyView + + + + 299 + + + + nextKeyView + + + + 300 + + + + nextKeyView + + + + 301 + + + + nextKeyView + + + + 302 + + + + nextKeyView + + + + 303 + + + + nextKeyView + + + + 304 + + + + nextKeyView + + + + 305 + + + + nextKeyView + + + + 306 + + + + nextKeyView + + + + 307 + + + + nextKeyView + + + + 308 + + + + nextKeyView + + + + 309 + + + + nextKeyView + + + + 310 + + + + nextKeyView + + + + 311 + + + + nextKeyView + + + + 312 + + + + nextKeyView + + + + 313 + + + + nextKeyView + + + + 314 + + + + nextKeyView + + + + 316 + + + + nextKeyView + + + + 317 + + + + nextKeyView + + + + 318 + + + + nextKeyView + + + + 319 + + + + nextKeyView + + + + 320 + + + + bitSheetFieldName + + + + 321 + + + + bitSheetHexTextField + + + + 322 + + + + bitSheetIntegerTextField + + + + 323 + + + + bitSheetOctalTextField + + + + 324 + + + + delegate + + + + 325 + + + + delegate + + + + 326 + + + + delegate + + + + 327 + + + + closeBitSheet: + + + + 328 + + + + closeBitSheet: + + + + 329 + + + + bitSheetSelectBit0: + + + + 330 + + + + delegate + + + + 331 + + + + bitSheet + + + + 332 + + + + bitSheetBitButton0 + + + + 333 + + + + bitSheetBitButtonWasClicked: + + + + 334 + + + + bitSheetBitButtonWasClicked: + + + + 336 + + + + bitSheetBitButton1 + + + + 337 + + + + bitSheetBitButtonWasClicked: + + + + 338 + + + + bitSheetBitButton2 + + + + 339 + + + + bitSheetBitButton3 + + + + 340 + + + + bitSheetBitButtonWasClicked: + + + + 341 + + + + bitSheetBitButton4 + + + + 342 + + + + bitSheetBitButtonWasClicked: + + + + 343 + + + + bitSheetBitButton5 + + + + 344 + + + + bitSheetBitButtonWasClicked: + + + + 345 + + + + bitSheetBitButton6 + + + + 346 + + + + bitSheetBitButtonWasClicked: + + + + 347 + + + + bitSheetBitButton7 + + + + 348 + + + + bitSheetBitButtonWasClicked: + + + + 349 + + + + bitSheetBitButton8 + + + + 350 + + + + bitSheetBitButtonWasClicked: + + + + 351 + + + + bitSheetBitLabel0 + + + + 368 + + + + bitSheetBitLabel8 + + + + 369 + + + + bitSheetBitLabel16 + + + + 370 + + + + bitSheetBitLabel24 + + + + 371 + + + + bitSheetBitLabel32 + + + + 372 + + + + bitSheetBitLabel40 + + + + 373 + + + + bitSheetBitLabel48 + + + + 374 + + + + nextKeyView + + + + 390 + + + + nextKeyView + + + + 391 + + + + nextKeyView + + + + 392 + + + + nextKeyView + + + + 393 + + + + nextKeyView + + + + 394 + + + + nextKeyView + + + + 395 + + + + nextKeyView + + + + 396 + + + + nextKeyView + + + + 397 + + + + bitSheetBitButton9 + + + + 398 + + + + bitSheetBitButtonWasClicked: + + + + 399 + + + + bitSheetOperatorButtonWasClicked: + + + + 400 + + + + bitSheetOperatorButtonWasClicked: + + + + 401 + + + + bitSheetOperatorButtonWasClicked: + + + + 402 + + + + bitSheetOperatorButtonWasClicked: + + + + 403 + + + + bitSheetOperatorButtonWasClicked: + + + + 404 + + + + bitSheetOperatorButtonWasClicked: + + + + 405 + + + + bitSheetOperatorButtonWasClicked: + + + + 406 + + + + bitSheetBitButtonWasClicked: + + + + 407 + + + + bitSheetBitButton10 + + + + 408 + + + + bitSheetBitButtonWasClicked: + + + + 409 + + + + bitSheetBitButton11 + + + + 410 + + + + bitSheetBitButtonWasClicked: + + + + 411 + + + + bitSheetBitButton12 + + + + 412 + + + + bitSheetBitButtonWasClicked: + + + + 413 + + + + bitSheetBitButton13 + + + + 414 + + + + bitSheetBitButtonWasClicked: + + + + 415 + + + + bitSheetBitButton14 + + + + 416 + + + + bitSheetBitButton15 + + + + 417 + + + + bitSheetBitButtonWasClicked: + + + + 418 + + + + bitSheetBitButtonWasClicked: + + + + 419 + + + + bitSheetBitButton16 + + + + 420 + + + + bitSheetBitButtonWasClicked: + + + + 421 + + + + bitSheetBitButton17 + + + + 422 + + + + bitSheetBitButton18 + + + + 423 + + + + bitSheetBitButtonWasClicked: + + + + 424 + + + + bitSheetBitButton19 + + + + 425 + + + + bitSheetBitButtonWasClicked: + + + + 426 + + + + bitSheetBitButton20 + + + + 427 + + + + bitSheetBitButtonWasClicked: + + + + 428 + + + + bitSheetBitButton21 + + + + 429 + + + + bitSheetBitButtonWasClicked: + + + + 430 + + + + bitSheetBitButton22 + + + + 431 + + + + bitSheetBitButtonWasClicked: + + + + 432 + + + + bitSheetBitButton23 + + + + 433 + + + + bitSheetBitButtonWasClicked: + + + + 434 + + + + bitSheetBitButton24 + + + + 435 + + + + bitSheetBitButtonWasClicked: + + + + 436 + + + + bitSheetBitButton25 + + + + 437 + + + + bitSheetBitButtonWasClicked: + + + + 438 + + + + bitSheetBitButtonWasClicked: + + + + 440 + + + + bitSheetBitButton26 + + + + 441 + + + + bitSheetBitButtonWasClicked: + + + + 442 + + + + bitSheetBitButton27 + + + + 443 + + + + bitSheetBitButtonWasClicked: + + + + 444 + + + + bitSheetBitButton28 + + + + 445 + + + + bitSheetBitButton29 + + + + 446 + + + + bitSheetBitButtonWasClicked: + + + + 447 + + + + bitSheetBitButton30 + + + + 448 + + + + bitSheetBitButtonWasClicked: + + + + 449 + + + + bitSheetBitButton31 + + + + 450 + + + + bitSheetBitButtonWasClicked: + + + + 451 + + + + bitSheetBitButtonWasClicked: + + + + 452 + + + + bitSheetBitButtonWasClicked: + + + + 453 + + + + bitSheetBitButtonWasClicked: + + + + 454 + + + + bitSheetBitButtonWasClicked: + + + + 455 + + + + bitSheetBitButtonWasClicked: + + + + 456 + + + + bitSheetBitButtonWasClicked: + + + + 457 + + + + bitSheetBitButtonWasClicked: + + + + 458 + + + + bitSheetBitButtonWasClicked: + + + + 459 + + + + bitSheetBitButtonWasClicked: + + + + 460 + + + + bitSheetBitButtonWasClicked: + + + + 461 + + + + bitSheetBitButtonWasClicked: + + + + 462 + + + + bitSheetBitButtonWasClicked: + + + + 463 + + + + bitSheetBitButtonWasClicked: + + + + 464 + + + + bitSheetBitButtonWasClicked: + + + + 465 + + + + bitSheetBitButtonWasClicked: + + + + 466 + + + + bitSheetBitButtonWasClicked: + + + + 467 + + + + bitSheetBitButtonWasClicked: + + + + 468 + + + + bitSheetBitButtonWasClicked: + + + + 469 + + + + bitSheetBitButtonWasClicked: + + + + 470 + + + + bitSheetBitButtonWasClicked: + + + + 471 + + + + bitSheetBitButtonWasClicked: + + + + 472 + + + + bitSheetBitButtonWasClicked: + + + + 474 + + + + bitSheetBitButtonWasClicked: + + + + 475 + + + + bitSheetBitButtonWasClicked: + + + + 476 + + + + bitSheetBitButtonWasClicked: + + + + 477 + + + + bitSheetBitButtonWasClicked: + + + + 478 + + + + bitSheetBitButtonWasClicked: + + + + 479 + + + + bitSheetBitButtonWasClicked: + + + + 480 + + + + bitSheetBitButtonWasClicked: + + + + 481 + + + + bitSheetBitButtonWasClicked: + + + + 482 + + + + bitSheetBitButtonWasClicked: + + + + 483 + + + + bitSheetBitButtonWasClicked: + + + + 484 + + + + bitSheetBitButton32 + + + + 485 + + + + bitSheetBitButton33 + + + + 486 + + + + bitSheetBitButton34 + + + + 487 + + + + bitSheetBitButton35 + + + + 488 + + + + bitSheetBitButton36 + + + + 489 + + + + bitSheetBitButton37 + + + + 490 + + + + bitSheetBitButton38 + + + + 491 + + + + bitSheetBitButton39 + + + + 492 + + + + bitSheetBitButton40 + + + + 493 + + + + bitSheetBitButton41 + + + + 494 + + + + bitSheetBitButton42 + + + + 495 + + + + bitSheetBitButton43 + + + + 496 + + + + bitSheetBitButton44 + + + + 497 + + + + bitSheetBitButton45 - + - 52 + 498 - editTextScrollView + bitSheetBitButton46 - + - 53 + 499 - hexTextView + bitSheetBitButton47 - + - 54 + 500 - hexTextScrollView + bitSheetBitButton48 - + - 55 + 501 - editImage + bitSheetBitButton49 - + - 56 + 502 - editSheetQuickLookButton + bitSheetBitButton50 - + - 57 + 503 - - dropImage: + + bitSheetBitButton51 - + - 58 + 504 - delegate - - + bitSheetBitButton52 + + - 59 + 505 - delegate - - + bitSheetBitButton53 + + - 60 + 506 - editSheetSegmentControl + bitSheetBitButton54 - + - 61 + 507 - delegate - - + bitSheetBitButton55 + + - 62 + 508 - editSheet + bitSheetBitButton56 - + - 63 + 509 - editSheetOkButton + bitSheetBitButton57 - + - 67 + 510 - editSheetCancelButton + bitSheetBitButton58 - + - 68 + 511 - editSheetOpenButton + bitSheetBitButton59 - + - 69 + 512 - window + bitSheetBitButton60 - + - 70 + 513 - editSheetFieldName + bitSheetBitButton61 - + - 75 + 514 - editSheetIsNotEditableCancelButton + bitSheetBitButton62 - + - 78 + 515 - - closeEditSheet: + + bitSheetBitButton63 - + - 79 + 516 + + + + bitSheetBitLabel56 + + + + 517 + + + + bitSheetOkButton + + + + 518 + + + + bitSheetCloseButton + + + + 519 @@ -2978,8 +5209,25 @@ - - + + + + + + + + + + + + + + + + + + + @@ -4016,32 +6264,270 @@ - 230 - + 240 + + + YES + + + + + + 241 + + + + + 242 + + + YES + + + + + + 243 + + + + + 244 + + + YES + + + + + + 245 + + + + + 249 + + + YES + + + + + + 250 + + + + + 352 + + + YES + + + + + + 353 + + + + + 354 + + + YES + + + + + + 355 + + + + + 356 + + + YES + + + + + + 357 + + + + + 358 + + + YES + + + + + + 359 + + + + + 360 + + + YES + + + + + + 361 + + + YES + + + + + + 362 + + + YES + + + + + + 363 + + + YES + + + + + + 364 + + + + + 365 + + + + + 366 + + + + + 367 + + + + + 376 + + + YES + + + + + + 377 + + + + + 378 + + + YES + + + + + + 379 + + + + + 380 + + + YES + + + + + + 381 + + + + + 382 + + + YES + + + + + + 383 + + + + + 384 + + + YES + + + + + + 385 + + + + + 386 + YES - + - 231 - - + 387 + + - 232 - + 388 + YES - + - 233 - - + 389 + + @@ -4207,10 +6693,14 @@ 227.IBPluginDependency 228.IBPluginDependency 229.IBPluginDependency - 230.IBPluginDependency - 231.IBPluginDependency - 232.IBPluginDependency - 233.IBPluginDependency + 240.IBPluginDependency + 241.IBPluginDependency + 242.IBPluginDependency + 243.IBPluginDependency + 244.IBPluginDependency + 245.IBPluginDependency + 249.IBPluginDependency + 250.IBPluginDependency 3.IBPluginDependency 30.IBPluginDependency 32.IBPluginDependency @@ -4220,13 +6710,50 @@ 34.IBShouldRemoveOnLegacySave 35.IBPluginDependency 35.ImportedFromIB2 + 352.IBPluginDependency + 353.IBPluginDependency + 354.IBPluginDependency + 355.IBPluginDependency + 356.IBPluginDependency + 357.IBPluginDependency + 358.IBPluginDependency + 359.IBPluginDependency 36.CustomClassName 36.IBPluginDependency 36.ImportedFromIB2 + 360.IBPluginDependency + 361.IBPluginDependency + 362.IBPluginDependency + 363.IBPluginDependency + 364.IBPluginDependency + 365.IBPluginDependency + 366.IBPluginDependency + 367.IBPluginDependency 37.IBPluginDependency 37.IBShouldRemoveOnLegacySave + 376.IBAttributePlaceholdersKey + 376.IBPluginDependency + 377.IBPluginDependency + 378.IBAttributePlaceholdersKey + 378.IBPluginDependency + 379.IBPluginDependency 38.IBPluginDependency 38.IBShouldRemoveOnLegacySave + 380.IBAttributePlaceholdersKey + 380.IBPluginDependency + 381.IBPluginDependency + 382.IBAttributePlaceholdersKey + 382.IBPluginDependency + 383.IBPluginDependency + 384.IBAttributePlaceholdersKey + 384.IBPluginDependency + 385.IBPluginDependency + 386.IBAttributePlaceholdersKey + 386.IBPluginDependency + 387.IBPluginDependency + 388.IBAttributePlaceholdersKey + 388.IBPluginDependency + 389.IBPluginDependency 4.IBPluginDependency 5.IBPluginDependency 5.ImportedFromIB2 @@ -4259,6 +6786,7 @@ 84.ImportedFromIB2 85.IBPluginDependency 85.ImportedFromIB2 + 86.IBAttributePlaceholdersKey 86.IBPluginDependency 87.IBPluginDependency 88.IBPluginDependency @@ -4266,7 +6794,9 @@ 9.IBPluginDependency 9.IBSegmentedControlTracker.RoundRobinState 9.IBSegmentedControlTracker.WasGrowing + 90.IBAttributePlaceholdersKey 90.IBPluginDependency + 91.IBAttributePlaceholdersKey 91.IBPluginDependency 92.IBPluginDependency 93.IBPluginDependency @@ -4280,9 +6810,9 @@ YES com.apple.InterfaceBuilder.CocoaPlugin - {{131, 568}, {667, 428}} + {{91, 231}, {667, 428}} com.apple.InterfaceBuilder.CocoaPlugin - {{131, 568}, {667, 428}} + {{91, 231}, {667, 428}} @@ -4403,7 +6933,42 @@ 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 + {{528, 472}, {92, 20}} + 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 + 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 @@ -4414,9 +6979,11 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - {{528, 472}, {92, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4425,7 +6992,9 @@ 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 @@ -4435,28 +7004,79 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Set all bits to 1 (⌘1) + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Set all bits to 0 (⌘0) + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Negate all bits (⌘N) + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Shift right (⌘R) + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Shift left (⌘L) + + com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - + + ToolTip + + ToolTip + + Rotate rigth (⇧⌘R) + + com.apple.InterfaceBuilder.CocoaPlugin - - SPEditSheetTextView com.apple.InterfaceBuilder.CocoaPlugin - + + ToolTip + + ToolTip + + Rotate left (⇧⌘L) + + com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4479,10 +7099,10 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{178, 778}, {411, 218}} + {{344, 658}, {411, 218}} com.apple.InterfaceBuilder.CocoaPlugin - {{178, 778}, {411, 218}} - + {{344, 658}, {411, 218}} + {196, 240} {{357, 418}, {480, 270}} @@ -4496,6 +7116,14 @@ com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Enter as octal number (⌘O) + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4503,7 +7131,23 @@ com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Enter as integer (⌘I) + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Enter as hexadecimal string (⌘H) + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -4531,7 +7175,7 @@ - 233 + 519 @@ -4934,6 +7578,10 @@ YES YES + bitSheetBitButtonWasClicked: + bitSheetOperatorButtonWasClicked: + bitSheetSelectBit0: + closeBitSheet: closeEditSheet: dropImage: openEditSheet: @@ -4949,12 +7597,20 @@ id id id + id + id + id + id YES YES + bitSheetBitButtonWasClicked: + bitSheetOperatorButtonWasClicked: + bitSheetSelectBit0: + closeBitSheet: closeEditSheet: dropImage: openEditSheet: @@ -4964,6 +7620,22 @@ YES + + bitSheetBitButtonWasClicked: + id + + + bitSheetOperatorButtonWasClicked: + id + + + bitSheetSelectBit0: + id + + + closeBitSheet: + id + closeEditSheet: id @@ -4994,6 +7666,85 @@ YES YES + bitSheet + bitSheetBitButton0 + bitSheetBitButton1 + bitSheetBitButton10 + bitSheetBitButton11 + bitSheetBitButton12 + bitSheetBitButton13 + bitSheetBitButton14 + bitSheetBitButton15 + bitSheetBitButton16 + bitSheetBitButton17 + bitSheetBitButton18 + bitSheetBitButton19 + bitSheetBitButton2 + bitSheetBitButton20 + bitSheetBitButton21 + bitSheetBitButton22 + bitSheetBitButton23 + bitSheetBitButton24 + bitSheetBitButton25 + bitSheetBitButton26 + bitSheetBitButton27 + bitSheetBitButton28 + bitSheetBitButton29 + bitSheetBitButton3 + bitSheetBitButton30 + bitSheetBitButton31 + bitSheetBitButton32 + bitSheetBitButton33 + bitSheetBitButton34 + bitSheetBitButton35 + bitSheetBitButton36 + bitSheetBitButton37 + bitSheetBitButton38 + bitSheetBitButton39 + bitSheetBitButton4 + bitSheetBitButton40 + bitSheetBitButton41 + bitSheetBitButton42 + bitSheetBitButton43 + bitSheetBitButton44 + bitSheetBitButton45 + bitSheetBitButton46 + bitSheetBitButton47 + bitSheetBitButton48 + bitSheetBitButton49 + bitSheetBitButton5 + bitSheetBitButton50 + bitSheetBitButton51 + bitSheetBitButton52 + bitSheetBitButton53 + bitSheetBitButton54 + bitSheetBitButton55 + bitSheetBitButton56 + bitSheetBitButton57 + bitSheetBitButton58 + bitSheetBitButton59 + bitSheetBitButton6 + bitSheetBitButton60 + bitSheetBitButton61 + bitSheetBitButton62 + bitSheetBitButton63 + bitSheetBitButton7 + bitSheetBitButton8 + bitSheetBitButton9 + bitSheetBitLabel0 + bitSheetBitLabel16 + bitSheetBitLabel24 + bitSheetBitLabel32 + bitSheetBitLabel40 + bitSheetBitLabel48 + bitSheetBitLabel56 + bitSheetBitLabel8 + bitSheetCloseButton + bitSheetFieldName + bitSheetHexTextField + bitSheetIntegerTextField + bitSheetOctalTextField + bitSheetOkButton editImage editSheet editSheetCancelButton @@ -5013,6 +7764,85 @@ YES id + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSButton + NSTextField + NSTextField + NSTextField + NSTextField + NSTextField + NSTextField + NSTextField + NSTextField + NSButton + NSTextField + NSTextField + NSTextField + NSTextField + NSButton + id id id id @@ -5033,6 +7863,85 @@ YES YES + bitSheet + bitSheetBitButton0 + bitSheetBitButton1 + bitSheetBitButton10 + bitSheetBitButton11 + bitSheetBitButton12 + bitSheetBitButton13 + bitSheetBitButton14 + bitSheetBitButton15 + bitSheetBitButton16 + bitSheetBitButton17 + bitSheetBitButton18 + bitSheetBitButton19 + bitSheetBitButton2 + bitSheetBitButton20 + bitSheetBitButton21 + bitSheetBitButton22 + bitSheetBitButton23 + bitSheetBitButton24 + bitSheetBitButton25 + bitSheetBitButton26 + bitSheetBitButton27 + bitSheetBitButton28 + bitSheetBitButton29 + bitSheetBitButton3 + bitSheetBitButton30 + bitSheetBitButton31 + bitSheetBitButton32 + bitSheetBitButton33 + bitSheetBitButton34 + bitSheetBitButton35 + bitSheetBitButton36 + bitSheetBitButton37 + bitSheetBitButton38 + bitSheetBitButton39 + bitSheetBitButton4 + bitSheetBitButton40 + bitSheetBitButton41 + bitSheetBitButton42 + bitSheetBitButton43 + bitSheetBitButton44 + bitSheetBitButton45 + bitSheetBitButton46 + bitSheetBitButton47 + bitSheetBitButton48 + bitSheetBitButton49 + bitSheetBitButton5 + bitSheetBitButton50 + bitSheetBitButton51 + bitSheetBitButton52 + bitSheetBitButton53 + bitSheetBitButton54 + bitSheetBitButton55 + bitSheetBitButton56 + bitSheetBitButton57 + bitSheetBitButton58 + bitSheetBitButton59 + bitSheetBitButton6 + bitSheetBitButton60 + bitSheetBitButton61 + bitSheetBitButton62 + bitSheetBitButton63 + bitSheetBitButton7 + bitSheetBitButton8 + bitSheetBitButton9 + bitSheetBitLabel0 + bitSheetBitLabel16 + bitSheetBitLabel24 + bitSheetBitLabel32 + bitSheetBitLabel40 + bitSheetBitLabel48 + bitSheetBitLabel56 + bitSheetBitLabel8 + bitSheetCloseButton + bitSheetFieldName + bitSheetHexTextField + bitSheetIntegerTextField + bitSheetOctalTextField + bitSheetOkButton editImage editSheet editSheetCancelButton @@ -5051,6 +7960,322 @@ YES + + bitSheet + id + + + bitSheetBitButton0 + NSButton + + + bitSheetBitButton1 + NSButton + + + bitSheetBitButton10 + NSButton + + + bitSheetBitButton11 + NSButton + + + bitSheetBitButton12 + NSButton + + + bitSheetBitButton13 + NSButton + + + bitSheetBitButton14 + NSButton + + + bitSheetBitButton15 + NSButton + + + bitSheetBitButton16 + NSButton + + + bitSheetBitButton17 + NSButton + + + bitSheetBitButton18 + NSButton + + + bitSheetBitButton19 + NSButton + + + bitSheetBitButton2 + NSButton + + + bitSheetBitButton20 + NSButton + + + bitSheetBitButton21 + NSButton + + + bitSheetBitButton22 + NSButton + + + bitSheetBitButton23 + NSButton + + + bitSheetBitButton24 + NSButton + + + bitSheetBitButton25 + NSButton + + + bitSheetBitButton26 + NSButton + + + bitSheetBitButton27 + NSButton + + + bitSheetBitButton28 + NSButton + + + bitSheetBitButton29 + NSButton + + + bitSheetBitButton3 + NSButton + + + bitSheetBitButton30 + NSButton + + + bitSheetBitButton31 + NSButton + + + bitSheetBitButton32 + NSButton + + + bitSheetBitButton33 + NSButton + + + bitSheetBitButton34 + NSButton + + + bitSheetBitButton35 + NSButton + + + bitSheetBitButton36 + NSButton + + + bitSheetBitButton37 + NSButton + + + bitSheetBitButton38 + NSButton + + + bitSheetBitButton39 + NSButton + + + bitSheetBitButton4 + NSButton + + + bitSheetBitButton40 + NSButton + + + bitSheetBitButton41 + NSButton + + + bitSheetBitButton42 + NSButton + + + bitSheetBitButton43 + NSButton + + + bitSheetBitButton44 + NSButton + + + bitSheetBitButton45 + NSButton + + + bitSheetBitButton46 + NSButton + + + bitSheetBitButton47 + NSButton + + + bitSheetBitButton48 + NSButton + + + bitSheetBitButton49 + NSButton + + + bitSheetBitButton5 + NSButton + + + bitSheetBitButton50 + NSButton + + + bitSheetBitButton51 + NSButton + + + bitSheetBitButton52 + NSButton + + + bitSheetBitButton53 + NSButton + + + bitSheetBitButton54 + NSButton + + + bitSheetBitButton55 + NSButton + + + bitSheetBitButton56 + NSButton + + + bitSheetBitButton57 + NSButton + + + bitSheetBitButton58 + NSButton + + + bitSheetBitButton59 + NSButton + + + bitSheetBitButton6 + NSButton + + + bitSheetBitButton60 + NSButton + + + bitSheetBitButton61 + NSButton + + + bitSheetBitButton62 + NSButton + + + bitSheetBitButton63 + NSButton + + + bitSheetBitButton7 + NSButton + + + bitSheetBitButton8 + NSButton + + + bitSheetBitButton9 + NSButton + + + bitSheetBitLabel0 + NSTextField + + + bitSheetBitLabel16 + NSTextField + + + bitSheetBitLabel24 + NSTextField + + + bitSheetBitLabel32 + NSTextField + + + bitSheetBitLabel40 + NSTextField + + + bitSheetBitLabel48 + NSTextField + + + bitSheetBitLabel56 + NSTextField + + + bitSheetBitLabel8 + NSTextField + + + bitSheetCloseButton + NSButton + + + bitSheetFieldName + NSTextField + + + bitSheetHexTextField + NSTextField + + + bitSheetIntegerTextField + NSTextField + + + bitSheetOctalTextField + NSTextField + + + bitSheetOkButton + NSButton + editImage id @@ -5139,15 +8364,11 @@ YES NSQuickLookTemplate NSSwitch - selectall - selectnone YES {19, 11} {15, 15} - {128, 128} - {128, 128} diff --git a/Source/SPDataCellFormatter.h b/Source/SPDataCellFormatter.h index a669fdc6..66bf442e 100644 --- a/Source/SPDataCellFormatter.h +++ b/Source/SPDataCellFormatter.h @@ -28,10 +28,12 @@ @interface SPDataCellFormatter : NSFormatter { NSInteger textLimit; + NSString *fieldType; } #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 @property NSInteger textLimit; + @property NSString* fieldType; #else -(NSInteger)textLimit; -(void)setTextLimit:(NSInteger)limit; diff --git a/Source/SPDataCellFormatter.m b/Source/SPDataCellFormatter.m index d373d608..9e7944f8 100644 --- a/Source/SPDataCellFormatter.m +++ b/Source/SPDataCellFormatter.m @@ -31,6 +31,7 @@ #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 @synthesize textLimit; + @synthesize fieldType; #else -(NSInteger)textLimit { @@ -71,28 +72,40 @@ return [[[NSAttributedString alloc] initWithString:[self stringForObjectValue:anObject] attributes:attributes] autorelease]; } - - - (BOOL)isPartialStringValid:(NSString *)partialString newEditingString:(NSString **)newString errorDescription:(NSString **)error { // No limit set or partialString is NULL value string allow editing if (textLimit == 0 || [partialString isEqualToString:[[NSUserDefaults standardUserDefaults] objectForKey:SPNullValue]]) return YES; - + // A single character over the length of the string - likely typed. Prevent the change. if ([partialString length] == textLimit + 1) { [SPTooltip showWithObject:[NSString stringWithFormat:NSLocalizedString(@"Maximum text length is set to %ld.", @"Maximum text length is set to %ld."), (long)textLimit]]; return NO; } - + // If the string is considerably longer than the limit, likely pasted. Accept but truncate. if ([partialString length] > textLimit) { [SPTooltip showWithObject:[NSString stringWithFormat:NSLocalizedString(@"Maximum text length is set to %ld. Inserted text was truncated.", @"Maximum text length is set to %ld. Inserted text was truncated."), (long)textLimit]]; *newString = [NSString stringWithString:[partialString substringToIndex:textLimit]]; return NO; } - - // Length inside limit. + + // Check for BIT fields whether 1 or 0 are typed + if(fieldType && [fieldType length] && [[fieldType uppercaseString] isEqualToString:@"BIT"]) { + + if(partialString == nil || ![partialString length]) return YES; + + // TODO HansJB + return YES; + // if() { + // [SPTooltip showWithObject:NSLocalizedString(@"For BIT fields only “1” or “0” are allowed.", @"For BIT fields only “1” or “0” are allowed.")]; + // return NO; + // } + + } + + return YES; } diff --git a/Source/SPFieldEditorController.h b/Source/SPFieldEditorController.h index 6ba9018b..e3877a2d 100644 --- a/Source/SPFieldEditorController.h +++ b/Source/SPFieldEditorController.h @@ -24,7 +24,7 @@ #import -@interface SPFieldEditorController : NSWindowController +@interface SPFieldEditorController : NSWindowController { IBOutlet id editSheetProgressBar; IBOutlet id editSheetSegmentControl; @@ -41,11 +41,94 @@ IBOutlet id editSheetOpenButton; IBOutlet id editSheetFieldName; + IBOutlet id bitSheet; + IBOutlet NSTextField *bitSheetFieldName; + IBOutlet NSTextField *bitSheetHexTextField; + IBOutlet NSTextField *bitSheetIntegerTextField; + IBOutlet NSTextField *bitSheetOctalTextField; + IBOutlet NSButton *bitSheetOkButton; + IBOutlet NSButton *bitSheetCloseButton; + IBOutlet NSButton *bitSheetBitButton0; + IBOutlet NSButton *bitSheetBitButton1; + IBOutlet NSButton *bitSheetBitButton2; + IBOutlet NSButton *bitSheetBitButton3; + IBOutlet NSButton *bitSheetBitButton4; + IBOutlet NSButton *bitSheetBitButton5; + IBOutlet NSButton *bitSheetBitButton6; + IBOutlet NSButton *bitSheetBitButton7; + IBOutlet NSButton *bitSheetBitButton8; + IBOutlet NSButton *bitSheetBitButton9; + IBOutlet NSButton *bitSheetBitButton10; + IBOutlet NSButton *bitSheetBitButton11; + IBOutlet NSButton *bitSheetBitButton12; + IBOutlet NSButton *bitSheetBitButton13; + IBOutlet NSButton *bitSheetBitButton14; + IBOutlet NSButton *bitSheetBitButton15; + IBOutlet NSButton *bitSheetBitButton16; + IBOutlet NSButton *bitSheetBitButton17; + IBOutlet NSButton *bitSheetBitButton18; + IBOutlet NSButton *bitSheetBitButton19; + IBOutlet NSButton *bitSheetBitButton20; + IBOutlet NSButton *bitSheetBitButton21; + IBOutlet NSButton *bitSheetBitButton22; + IBOutlet NSButton *bitSheetBitButton23; + IBOutlet NSButton *bitSheetBitButton24; + IBOutlet NSButton *bitSheetBitButton25; + IBOutlet NSButton *bitSheetBitButton26; + IBOutlet NSButton *bitSheetBitButton27; + IBOutlet NSButton *bitSheetBitButton28; + IBOutlet NSButton *bitSheetBitButton29; + IBOutlet NSButton *bitSheetBitButton30; + IBOutlet NSButton *bitSheetBitButton31; + IBOutlet NSButton *bitSheetBitButton32; + IBOutlet NSButton *bitSheetBitButton33; + IBOutlet NSButton *bitSheetBitButton34; + IBOutlet NSButton *bitSheetBitButton35; + IBOutlet NSButton *bitSheetBitButton36; + IBOutlet NSButton *bitSheetBitButton37; + IBOutlet NSButton *bitSheetBitButton38; + IBOutlet NSButton *bitSheetBitButton39; + IBOutlet NSButton *bitSheetBitButton40; + IBOutlet NSButton *bitSheetBitButton41; + IBOutlet NSButton *bitSheetBitButton42; + IBOutlet NSButton *bitSheetBitButton43; + IBOutlet NSButton *bitSheetBitButton44; + IBOutlet NSButton *bitSheetBitButton45; + IBOutlet NSButton *bitSheetBitButton46; + IBOutlet NSButton *bitSheetBitButton47; + IBOutlet NSButton *bitSheetBitButton48; + IBOutlet NSButton *bitSheetBitButton49; + IBOutlet NSButton *bitSheetBitButton50; + IBOutlet NSButton *bitSheetBitButton51; + IBOutlet NSButton *bitSheetBitButton52; + IBOutlet NSButton *bitSheetBitButton53; + IBOutlet NSButton *bitSheetBitButton54; + IBOutlet NSButton *bitSheetBitButton55; + IBOutlet NSButton *bitSheetBitButton56; + IBOutlet NSButton *bitSheetBitButton57; + IBOutlet NSButton *bitSheetBitButton58; + IBOutlet NSButton *bitSheetBitButton59; + IBOutlet NSButton *bitSheetBitButton60; + IBOutlet NSButton *bitSheetBitButton61; + IBOutlet NSButton *bitSheetBitButton62; + IBOutlet NSButton *bitSheetBitButton63; + IBOutlet NSTextField *bitSheetBitLabel0; + IBOutlet NSTextField *bitSheetBitLabel8; + IBOutlet NSTextField *bitSheetBitLabel16; + IBOutlet NSTextField *bitSheetBitLabel24; + IBOutlet NSTextField *bitSheetBitLabel32; + IBOutlet NSTextField *bitSheetBitLabel40; + IBOutlet NSTextField *bitSheetBitLabel48; + IBOutlet NSTextField *bitSheetBitLabel56; + id sheetEditData; BOOL editSheetWillBeInitialized; - BOOL isBlob; + BOOL _isBlob; + BOOL _isEditable; NSInteger quickLookCloseMarker; NSStringEncoding encoding; + NSString *fieldType; + NSString *fieldEncoding; NSString *stringValue; NSString *tmpFileName; NSString *tmpDirPath; @@ -57,6 +140,8 @@ BOOL wasCutPaste; BOOL selectionChanged; + NSArray *bitSheetBitButtonsArray; + NSUserDefaults *prefs; NSDictionary *qlTypes; @@ -74,10 +159,18 @@ - (IBAction)quickLookFormatButton:(id)sender; - (IBAction)dropImage:(id)sender; -- (id)editWithObject:(id)data fieldName:(NSString*)fieldName usingEncoding:(NSStringEncoding)anEncoding +- (IBAction)closeBitSheet:(id)sender; +- (IBAction)bitSheetSelectBit0:(id)sender; +- (IBAction)bitSheetBitButtonWasClicked:(id)sender; +- (IBAction)bitSheetOperatorButtonWasClicked:(id)sender; + + +- (id)editWithObject:(id)data fieldName:(NSString*)fieldName usingEncoding:(NSStringEncoding)anEncoding isObjectBlob:(BOOL)isFieldBlob isEditable:(BOOL)isEditable withWindow:(NSWindow *)theWindow; - (void)setTextMaxLength:(unsigned long long)length; +- (void)setFieldType:(NSString*)aType; +- (void)setFieldEncoding:(NSString*)aEncoding; - (void)processPasteImageData; - (void)processUpdatedImageData:(NSData *)data; diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m index 7bef2719..fa3029e1 100644 --- a/Source/SPFieldEditorController.m +++ b/Source/SPFieldEditorController.m @@ -44,7 +44,9 @@ counter = 0; maxTextLength = 0; stringValue = nil; - + _isEditable = NO; + _isBlob = NO; + prefs = [NSUserDefaults standardUserDefaults]; // Used for max text length recognition if last typed char is a non-space char @@ -52,13 +54,13 @@ // Allow the user to enter cmd+return to close the edit sheet in addition to fn+return [editSheetOkButton setKeyEquivalentModifierMask:NSCommandKeyMask]; - + allowUndo = NO; selectionChanged = NO; - + tmpDirPath = NSTemporaryDirectory(); tmpFileName = nil; - + NSMenu *menu = [editSheetQuickLookButton menu]; [menu setAutoenablesItems:NO]; NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Interpret data as:", @"Interpret data as:") action:NULL keyEquivalent:@""]; @@ -74,10 +76,10 @@ NSString *convError = nil; NSPropertyListFormat format; - NSData *defaultTypeData = [NSData dataWithContentsOfFile:[NSBundle pathForResource:@"EditorQuickLookTypes.plist" ofType:nil inDirectory:[[NSBundle mainBundle] bundlePath]] + NSData *defaultTypeData = [NSData dataWithContentsOfFile:[NSBundle pathForResource:@"EditorQuickLookTypes.plist" ofType:nil inDirectory:[[NSBundle mainBundle] bundlePath]] options:NSMappedRead error:&readError]; - NSDictionary *defaultQLTypes = [NSPropertyListSerialization propertyListFromData:defaultTypeData + NSDictionary *defaultQLTypes = [NSPropertyListSerialization propertyListFromData:defaultTypeData mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError]; if(defaultQLTypes == nil || readError != nil || convError != nil) NSLog(@"Error while reading 'EditorQuickLookTypes.plist':\n%@\n%@", [readError localizedDescription], convError); @@ -106,9 +108,14 @@ } qlTypes = [NSDictionary dictionaryWithObject:qlTypesItems forKey:SPQuickLookTypes]; [qlTypesItems release]; + + bitSheetBitButtonsArray = nil; + fieldType = @""; + fieldEncoding = @""; + } return self; - + } - (void)dealloc @@ -130,118 +137,134 @@ maxTextLength = length; } -- (id)editWithObject:(id)data fieldName:(NSString*)fieldName usingEncoding:(NSStringEncoding)anEncoding +- (void)setFieldType:(NSString*)aType +{ + fieldType = aType; +} + +- (void)setFieldEncoding:(NSString*)aEncoding +{ + fieldEncoding = aEncoding; +} + +- (id)editWithObject:(id)data fieldName:(NSString*)fieldName usingEncoding:(NSStringEncoding)anEncoding isObjectBlob:(BOOL)isFieldBlob isEditable:(BOOL)isEditable withWindow:(NSWindow *)theWindow { - // If required, use monospaced fonts - if (![prefs objectForKey:SPFieldEditorSheetFont]) { - [editTextView setFont:([prefs boolForKey:SPUseMonospacedFonts]) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; - } - else { - [editTextView setFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:@"FieldEditorSheetFont"]]]; - } - [editTextView setContinuousSpellCheckingEnabled:[prefs boolForKey:SPBlobTextEditorSpellCheckingEnabled]]; + id usedSheet; - [hexTextView setFont:[NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]]]; + _isEditable = isEditable; - [editSheetFieldName setStringValue:[NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"Field", @"Field"), fieldName]]; + if(NO && [fieldType length] && [fieldType isEqualToString:@"BIT"]) { + + usedSheet = bitSheet; + + [NSApp beginSheet:usedSheet modalForWindow:theWindow modalDelegate:self didEndSelector:nil contextInfo:nil]; - // hide all views in editSheet - [hexTextView setHidden:YES]; - [hexTextScrollView setHidden:YES]; - [editImage setHidden:YES]; - [editTextView setHidden:YES]; - [editTextScrollView setHidden:YES]; - - if (!isEditable) { - [editSheetOkButton setHidden:YES]; - [editSheetCancelButton setHidden:YES]; - [editSheetIsNotEditableCancelButton setHidden:NO]; - [editSheetOpenButton setEnabled:NO]; - } - - editSheetWillBeInitialized = YES; - - encoding = anEncoding; - - isBlob = isFieldBlob; - - sheetEditData = [data retain]; - - // hide all views in editSheet - [hexTextView setHidden:YES]; - [hexTextScrollView setHidden:YES]; - [editImage setHidden:YES]; - [editTextView setHidden:YES]; - [editTextScrollView setHidden:YES]; - - // Hide QuickLook button and text/iamge/hex control for text data - [editSheetQuickLookButton setHidden:(!isBlob)]; - [editSheetSegmentControl setHidden:(!isBlob)]; - - // Set window's min size since no segment and quicklook buttons are hidden - if (isBlob) { - [editSheet setFrameAutosaveName:@"SPFieldEditorBlobSheet"]; - [editSheet setMinSize:NSMakeSize(560, 200)]; } else { - [editSheet setFrameAutosaveName:@"SPFieldEditorTextSheet"]; - [editSheet setMinSize:NSMakeSize(340, 150)]; - } - - [editTextView setEditable:isEditable]; - [editImage setEditable:isEditable]; - - [NSApp beginSheet:editSheet modalForWindow:theWindow modalDelegate:self didEndSelector:nil contextInfo:nil]; - - [editSheetProgressBar startAnimation:self]; - - NSImage *image = nil; - 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:sheetEditData encoding:encoding]; - if (stringValue == nil) - stringValue = [[NSString alloc] initWithData:sheetEditData encoding:NSASCIIStringEncoding]; - - [hexTextView setHidden:NO]; - [hexTextScrollView setHidden:NO]; + + usedSheet = editSheet; + + // If required, use monospaced fonts + if (![prefs objectForKey:SPFieldEditorSheetFont]) { + [editTextView setFont:([prefs boolForKey:SPUseMonospacedFonts]) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } + else { + [editTextView setFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:@"FieldEditorSheetFont"]]]; + } + + [editTextView setContinuousSpellCheckingEnabled:[prefs boolForKey:SPBlobTextEditorSpellCheckingEnabled]]; + + [hexTextView setFont:[NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]]]; + + // Set field label + NSMutableString *label = [NSMutableString string]; + [label appendFormat:@"“%@”", fieldName]; + if([fieldType length] || maxTextLength > 0 || [fieldEncoding length]) + [label appendString:@" – "]; + if([fieldType length]) + [label appendString:fieldType]; + if(maxTextLength > 0) + [label appendFormat:@"(%ld) ", maxTextLength]; + if([fieldEncoding length]) + [label appendString:fieldEncoding]; + + [editSheetFieldName setStringValue:[NSString stringWithFormat:@"%@: %@%", NSLocalizedString(@"Field", @"Field"), label]]; + + // hide all views in editSheet + [hexTextView setHidden:YES]; + [hexTextScrollView setHidden:YES]; [editImage setHidden:YES]; [editTextView setHidden:YES]; [editTextScrollView setHidden:YES]; - [editSheetSegmentControl setSelectedSegment:2]; - } else { - stringValue = [sheetEditData retain]; - - [hexTextView setString:@""]; - + + if (!_isEditable) { + [editSheetOkButton setHidden:YES]; + [editSheetCancelButton setHidden:YES]; + [editSheetIsNotEditableCancelButton setHidden:NO]; + [editSheetOpenButton setEnabled:NO]; + } + + editSheetWillBeInitialized = YES; + + encoding = anEncoding; + + _isBlob = isFieldBlob; + BOOL _isBINARY = ([fieldType isEqualToString:@"BINARY"] || [fieldType isEqualToString:@"VARBINARY"]); + + sheetEditData = [data retain]; + + // hide all views in editSheet [hexTextView setHidden:YES]; [hexTextScrollView setHidden:YES]; [editImage setHidden:YES]; - [editTextView setHidden:NO]; - [editTextScrollView setHidden:NO]; - [editSheetSegmentControl setSelectedSegment:0]; - } - - if (image) { - [editImage setImage:image]; - - [hexTextView setHidden:YES]; - [hexTextScrollView setHidden:YES]; - [editImage setHidden:NO]; [editTextView setHidden:YES]; [editTextScrollView setHidden:YES]; - [editSheetSegmentControl setSelectedSegment:1]; - } else { - [editImage setImage:nil]; - } - if (stringValue) { - [editTextView setString:stringValue]; - if(image == nil) { + // Hide QuickLook button and text/iamge/hex control for text data + [editSheetQuickLookButton setHidden:(!_isBlob && !_isBINARY)]; + [editSheetSegmentControl setHidden:(!_isBlob && !_isBINARY)]; + + [editSheetSegmentControl setEnabled:YES forSegment:1]; + + // Set window's min size since no segment and quicklook buttons are hidden + if (_isBlob || _isBINARY) { + [editSheet setFrameAutosaveName:@"SPFieldEditorBlobSheet"]; + [editSheet setMinSize:NSMakeSize(560, 200)]; + } else { + [editSheet setFrameAutosaveName:@"SPFieldEditorTextSheet"]; + [editSheet setMinSize:NSMakeSize(340, 150)]; + } + + [editTextView setEditable:_isEditable]; + [editImage setEditable:_isEditable]; + + [NSApp beginSheet:usedSheet modalForWindow:theWindow modalDelegate:self didEndSelector:nil contextInfo:nil]; + + [editSheetProgressBar startAnimation:self]; + + NSImage *image = nil; + 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:sheetEditData encoding:encoding]; + if (stringValue == nil) + stringValue = [[NSString alloc] initWithData:sheetEditData encoding:NSASCIIStringEncoding]; + + [hexTextView setHidden:NO]; + [hexTextScrollView setHidden:NO]; + [editImage setHidden:YES]; + [editTextView setHidden:YES]; + [editTextScrollView setHidden:YES]; + [editSheetSegmentControl setSelectedSegment:2]; + } else { + stringValue = [sheetEditData retain]; + + [hexTextView setString:@""]; + [hexTextView setHidden:YES]; [hexTextScrollView setHidden:YES]; [editImage setHidden:YES]; @@ -250,45 +273,75 @@ [editSheetSegmentControl setSelectedSegment:0]; } - // Locate the caret in editTextView - // (to select all takes a bit time for large data) - [editTextView setSelectedRange:NSMakeRange(0,0)]; + if (image) { + [editImage setImage:image]; - // If the string content is NULL select NULL for convenience - if([stringValue isEqualToString:[prefs objectForKey:SPNullValue]]) - [editTextView setSelectedRange:NSMakeRange(0,[[editTextView string] length])]; + [hexTextView setHidden:YES]; + [hexTextScrollView setHidden:YES]; + [editImage setHidden:NO]; + [editTextView setHidden:YES]; + [editTextScrollView setHidden:YES]; + [editSheetSegmentControl setSelectedSegment:1]; + } else { + [editImage setImage:nil]; + } + if (stringValue) { + [editTextView setString:stringValue]; + + if(image == nil) { + if(!_isBINARY) { + [hexTextView setHidden:YES]; + [hexTextScrollView setHidden:YES]; + } else { + [editSheetSegmentControl setEnabled:NO forSegment:1]; + } + [editImage setHidden:YES]; + [editTextView setHidden:NO]; + [editTextScrollView setHidden:NO]; + [editSheetSegmentControl setSelectedSegment:0]; + } + + // Locate the caret in editTextView + // (to select all takes a bit time for large data) + [editTextView setSelectedRange:NSMakeRange(0,0)]; + + // If the string content is NULL select NULL for convenience + if([stringValue isEqualToString:[prefs objectForKey:SPNullValue]]) + [editTextView setSelectedRange:NSMakeRange(0,[[editTextView string] length])]; + + // Set focus + if(image == nil) + [editSheet makeFirstResponder:editTextView]; + else + [editSheet makeFirstResponder:editImage]; + + [stringValue release], stringValue = nil; + } + + editSheetWillBeInitialized = NO; + + [editSheetProgressBar stopAnimation:self]; - // Set focus - if(image == nil) - [editSheet makeFirstResponder:editTextView]; - else - [editSheet makeFirstResponder:editImage]; - - [stringValue release], stringValue = nil; } - - editSheetWillBeInitialized = NO; - - [editSheetProgressBar stopAnimation:self]; // wait for editSheet - NSModalSession session = [NSApp beginModalSessionForWindow:editSheet]; + NSModalSession session = [NSApp beginModalSessionForWindow:usedSheet]; NSInteger cycleCounter = 0; BOOL doGroupDueToChars = NO; for (;;) { // Break the run loop if editSheet was closed - if ([NSApp runModalSession:session] != NSRunContinuesResponse - || ![editSheet isVisible]) + if ([NSApp runModalSession:session] != NSRunContinuesResponse + || ![usedSheet isVisible]) break; // Execute code on DefaultRunLoop (like displaying a tooltip) - [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode + [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; // Allow undo grouping if user typed a ' ' (for word level undo) // or a RETURN but not for each char due to writing speed - if([[NSApp currentEvent] type] == NSKeyDown + if([[NSApp currentEvent] type] == NSKeyDown && ( [[[NSApp currentEvent] charactersIgnoringModifiers] isEqualToString:@" "] || [[NSApp currentEvent] keyCode] == 36 @@ -317,16 +370,16 @@ } [NSApp endModalSession:session]; - [editSheet orderOut:nil]; - [NSApp endSheet:editSheet]; + [usedSheet orderOut:nil]; + [NSApp endSheet:usedSheet]; // For safety reasons inform QuickLook to quit quickLookCloseMarker = 1; // Remember spell cheecker status [prefs setBool:[editTextView isContinuousSpellCheckingEnabled] forKey:SPBlobTextEditorSpellCheckingEnabled]; - - return ( editSheetReturnCode && isEditable ) ? sheetEditData : nil; + + return ( editSheetReturnCode && _isEditable ) ? sheetEditData : nil; } /* @@ -345,6 +398,25 @@ wasCutPaste = YES; } +- (IBAction)closeBitSheet:(id)sender +{ + + editSheetReturnCode = 0; + + if(sender == bitSheetOkButton && _isEditable) { + [NSApp stopModal]; + editSheetReturnCode = 1; + } + + [NSApp abortModal]; + +} + +- (IBAction)bitSheetOperatorButtonWasClicked:(id)sender +{ + +} + - (IBAction)closeEditSheet:(id)sender { @@ -363,7 +435,7 @@ [NSApp stopModal]; editSheetReturnCode = 1; } - + // Delete all QuickLook temp files if it was invoked if(tmpFileName != nil) { NSArray *dirContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:tmpDirPath error:nil]; @@ -375,17 +447,17 @@ } } } - + [NSApp abortModal]; } - (IBAction)openEditSheet:(id)sender { - [[NSOpenPanel openPanel] beginSheetForDirectory:nil - file:@"" - modalForWindow:[self window] - modalDelegate:self didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) + [[NSOpenPanel openPanel] beginSheetForDirectory:nil + file:@"" + modalForWindow:[self window] + modalDelegate:self didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:NULL]; } @@ -435,12 +507,12 @@ * Saves a file containing the content of the editSheet */ - (IBAction)saveEditSheet:(id)sender -{ - [[NSSavePanel savePanel] beginSheetForDirectory:nil - file:@"" - modalForWindow:[self window] - modalDelegate:self - didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) +{ + [[NSSavePanel savePanel] beginSheetForDirectory:nil + file:@"" + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:NULL]; } @@ -450,24 +522,24 @@ - (void)savePanelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { if (returnCode == NSOKButton) { - + [editSheetProgressBar startAnimation:self]; - + NSString *fileName = [panel filename]; - + // Write binary field types directly to the file if ( [sheetEditData isKindOfClass:[NSData class]] ) { [sheetEditData writeToFile:fileName atomically:YES]; - + // Write other field types' representations to the file via the current encoding - } + } else { [[sheetEditData description] writeToFile:fileName atomically:YES encoding:encoding error:NULL]; } - + [editSheetProgressBar stopAnimation:self]; } } @@ -480,37 +552,37 @@ if (returnCode == NSOKButton) { NSString *fileName = [panel filename]; NSString *contents = nil; - + editSheetWillBeInitialized = YES; - + [editSheetProgressBar startAnimation:self]; - + // free old data if ( sheetEditData != nil ) { [sheetEditData release]; } - + // load new data/images sheetEditData = [[NSData alloc] initWithContentsOfFile:fileName]; - + NSImage *image = [[NSImage alloc] initWithData:sheetEditData]; contents = [[NSString alloc] initWithData:sheetEditData encoding:encoding]; if (contents == nil) contents = [[NSString alloc] initWithData:sheetEditData encoding:NSASCIIStringEncoding]; - + // set the image preview, string contents and hex representation [editImage setImage:image]; - - + + if(contents) [editTextView setString:contents]; else [editTextView setString:@""]; - + // Load hex data only if user has already displayed them if(![[hexTextView string] isEqualToString:@""]) [hexTextView setString:[sheetEditData dataToFormattedHexString]]; - + // If the image cell now contains a valid image, select the image view if (image) { [editSheetSegmentControl setSelectedSegment:1]; @@ -519,7 +591,7 @@ [editImage setHidden:NO]; [editTextView setHidden:YES]; [editTextScrollView setHidden:YES]; - + // Otherwise deselect the image view } else { [editSheetSegmentControl setSelectedSegment:0]; @@ -529,7 +601,7 @@ [editTextView setHidden:NO]; [editTextScrollView setHidden:NO]; } - + [image release]; if(contents) [contents release]; @@ -559,10 +631,10 @@ // if data are binary if ( [sheetEditData isKindOfClass:[NSData class]] && !isText) { [sheetEditData writeToFile:tmpFileName atomically:YES]; - + // write other field types' representations to the file via the current encoding } else { - + // if "html" type try to set the HTML charset - not yet completed if([type isEqualToString:@"html"]) { @@ -607,7 +679,7 @@ // Init QuickLook id ql = [NSClassFromString(@"QLPreviewPanel") sharedPreviewPanel]; - + [[ql delegate] setDelegate:self]; [ql setURLs:[NSArray arrayWithObject: [NSURL fileURLWithPath:tmpFileName]] currentIndex:0 preservingDisplayState:YES]; @@ -622,21 +694,21 @@ [ql setEnableDragNDrop:NO]; // Order out QuickLook with animation effect according to self:previewPanel:frameForURL: [ql makeKeyAndOrderFrontWithEffect:2]; // 1 = fade in - + // quickLookCloseMarker == 1 break the modal session quickLookCloseMarker = 0; - + [editSheetProgressBar stopAnimation:self]; // Run QuickLook in its own modal seesion for event handling NSModalSession session = [NSApp beginModalSessionForWindow:ql]; for (;;) { // Conditions for closing QuickLook - if ([NSApp runModalSession:session] != NSRunContinuesResponse - || quickLookCloseMarker == 1 - || ![ql isVisible]) + if ([NSApp runModalSession:session] != NSRunContinuesResponse + || quickLookCloseMarker == 1 + || ![ql isVisible]) break; - [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode + [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; } @@ -649,7 +721,7 @@ // Load QL via framework (SDK 10.5 but SP runs on 10.6) // TODO: This is an hack in order to be able to support QuickLook on Mac OS X 10.5 and 10.6 // as long as SP will be compiled against SDK 10.5. - // If SP will be compiled against SDK 10.6 we can use the standard way by using + // If SP will be compiled against SDK 10.6 we can use the standard way by using // the QuickLookUI which is part of the Quartz.framework. See Developer example "QuickLookDownloader" // file:///Developer/Documentation/DocSets/com.apple.adc.documentation.AppleSnowLeopard.CoreReference.docset/Contents/Resources/Documents/samplecode/QuickLookDownloader/index.html#//apple_ref/doc/uid/DTS40009082 else if([[NSBundle bundleWithPath:@"/System/Library/Frameworks/Quartz.framework/Frameworks/QuickLookUI.framework"] load]) { @@ -720,18 +792,18 @@ // If an empty frame is returned then the panel will fade in/out instead - (NSRect)previewPanel:(NSPanel*)panel frameForURL:(NSURL*)URL { - + // Close modal session defined in invokeQuickLookOfType: // if user closes the QuickLook view quickLookCloseMarker = 1; - + // Return the App's middle point NSRect mwf = [[NSApp mainWindow] frame]; return NSMakeRect( mwf.origin.x+mwf.size.width/2, mwf.origin.y+mwf.size.height/2, 5, 5); - + } // QuickLook delegates for SDK 10.6 // It should return the frame for the item represented by the URL @@ -755,33 +827,33 @@ { editSheetWillBeInitialized = YES; - + NSImage *image = nil; - + image = [[[NSImage alloc] initWithPasteboard:[NSPasteboard generalPasteboard]] autorelease]; if (image) { - + if (nil != sheetEditData) [sheetEditData release]; - + [editImage setImage:image]; - + if( sheetEditData ) [sheetEditData release]; sheetEditData = [[NSData alloc] initWithData:[image TIFFRepresentationUsingCompression:NSTIFFCompressionLZW factor:1]]; - + NSString *contents = [[NSString alloc] initWithData:sheetEditData encoding:encoding]; if (contents == nil) 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:[sheetEditData dataToFormattedHexString]]; - + [contents release]; - + } - + editSheetWillBeInitialized = NO; } /* @@ -790,11 +862,11 @@ */ - (void)processUpdatedImageData:(NSData *)data { - + editSheetWillBeInitialized = YES; - + 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 ) { sheetEditData = [[NSData alloc] init]; @@ -803,26 +875,26 @@ editSheetWillBeInitialized = NO; return; } - + // Process the provided image sheetEditData = [[NSData alloc] initWithData:data]; NSString *contents = [[NSString alloc] initWithData:data encoding:encoding]; if (contents == nil) contents = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding]; - + // Set the string contents and hex representation if(contents) [editTextView setString:contents]; if(![[hexTextView string] isEqualToString:@""]) [hexTextView setString:[sheetEditData dataToFormattedHexString]]; - + [contents release]; editSheetWillBeInitialized = NO; } - (IBAction)dropImage:(id)sender { - + // 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 ) { @@ -834,6 +906,19 @@ } } +#pragma mark - +#pragma mark BIT Field Sheet + +- (IBAction)bitSheetSelectBit0:(id)sender +{ + +} + +- (IBAction)bitSheetBitButtonWasClicked:(id)sender +{ + +} + #pragma mark - #pragma mark Delegates @@ -843,7 +928,7 @@ - (BOOL)textView:(NSTextView *)textView shouldChangeTextInRange:(NSRange)r replacementString:(NSString *)replacementString { - if(textView == editTextView && maxTextLength > 0 + if(textView == editTextView && (maxTextLength > 0) && ![ [[[editTextView textStorage] string] stringByAppendingString:replacementString] isEqualToString:[prefs objectForKey:SPNullValue]]) { NSInteger newLength; @@ -861,30 +946,30 @@ if (r.location==NSNotFound) return NO; // Length checking while using the Input Manager (eg for Japanese) - if ([textView hasMarkedText] && maxTextLength > 0 && r.location < maxTextLength) + if ([textView hasMarkedText] && (maxTextLength > 0) && (r.location < maxTextLength)) // User tries to insert a new char but max text length was already reached - return NO - if( !r.length && [[textView textStorage] length] >= maxTextLength ) { + if( !r.length && ([[textView textStorage] length] >= maxTextLength) ) { [SPTooltip showWithObject:[NSString stringWithFormat:NSLocalizedString(@"Maximum text length is set to %llu.", @"Maximum text length is set to %llu."), maxTextLength]]; [textView unmarkText]; return NO; } - // otherwise allow it if insertion point is valid for eg + // otherwise allow it if insertion point is valid for eg // a VARCHAR(3) field filled with two Chinese chars and one inserts the // third char by typing its pronounciation "wo" - 2 Chinese chars plus "wo" would give // 4 which is larger than max length. // TODO this doesn't solve the problem of inserting more than one char. For now // that part which won't be saved will be hilited if user pressed the OK button. - else if (r.location < maxTextLength) + else if (r.location < maxTextLength) return YES; // Calculate the length of the text after the change. - newLength=[[textView textStorage] length]+[replacementString length]-r.length; + newLength=[[[textView textStorage] string] length]+[replacementString length]-r.length; - // If it's too long, disallow the change but try + // If it's too long, disallow the change but try // to insert a text chunk partially to maxTextLength. - if (newLength>maxTextLength) { - - if(maxTextLength-[[textView textStorage] length]+[textView selectedRange].length <= [replacementString length]) { + if (newLength > maxTextLength) { + + if((maxTextLength-[[textView textStorage] length]+[textView selectedRange].length) <= [replacementString length]) { if(maxTextLength-[[textView textStorage] length]+[textView selectedRange].length) [SPTooltip showWithObject:[NSString stringWithFormat:NSLocalizedString(@"Maximum text length is set to %llu. Inserted text was truncated.", @"Maximum text length is set to %llu. Inserted text was truncated."), maxTextLength]]; else @@ -908,7 +993,7 @@ { // Do nothing if user really didn't changed text (e.g. for font size changing return) - if(!editTextViewWasChanged && (editSheetWillBeInitialized + if(!editTextViewWasChanged && (editSheetWillBeInitialized || (([[[notification object] textStorage] editedRange].length == 0) && ([[[notification object] textStorage] changeInLength] == 0)))) { // Inform the undo-grouping about the caret movement @@ -919,7 +1004,7 @@ // clear the image and hex (since i doubt someone can "type" a gif) [editImage setImage:nil]; [hexTextView setString:@""]; - + // free old data if ( sheetEditData != nil ) { [sheetEditData release]; @@ -927,7 +1012,7 @@ // set edit data to text sheetEditData = [[NSString stringWithString:[editTextView string]] retain]; - + } #pragma - @@ -946,7 +1031,7 @@ return YES; } } - + return NO; } diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 90e7262a..79afe0a8 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -434,10 +434,14 @@ [dataCell setFormatter:[[SPDataCellFormatter new] autorelease]]; // Set field length limit if field is a varchar to match varchar length - if ([[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"string"]) { + if ([[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"string"] + || [[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"bit"]) { [[dataCell formatter] setTextLimit:[[columnDefinition objectForKey:@"length"] integerValue]]; } + // Set field type for validations + [[dataCell formatter] setFieldType:[columnDefinition objectForKey:@"type"]]; + // Set the data cell font according to the preferences [dataCell setFont:tableFont]; @@ -2485,7 +2489,7 @@ /** * Returns the WHERE argument to identify a row. * If "row" is -2, it uses the oldRow value. - * "excludeLimits" controls whether a LIMIT 1 is appended if no primary key was available to + * "excludeLimits" controls whether a LIMIT 1 is appended if no primary key was available to * uniquely identify the row. */ - (NSString *)argumentForRow:(NSInteger)row excludingLimits:(BOOL)excludeLimits @@ -2668,7 +2672,7 @@ [tableDocumentInstance startTaskWithDescription:NSLocalizedString(@"Checking field data for editing...", @"checking field data for editing task description")]; - // Actual check whether field can be identified bijectively + // Actual check whether field can be identified bijectively MCPResult *tempResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT COUNT(1) FROM %@.%@ %@", [[columnDefinition objectForKey:@"db"] backtickQuotedString], [tableForColumn backtickQuotedString], @@ -2705,7 +2709,7 @@ [tableDocumentInstance endTask]; return [NSArray arrayWithObjects:[NSNumber numberWithInteger:-1], @"", nil]; } - + } [tableDocumentInstance endTask]; @@ -3480,7 +3484,7 @@ if ([tableDocumentInstance isWorking]) return NO; if ( aTableView == tableContentView ) { - + // Ensure that row is editable since it could contain "(not loaded)" columns together with // issue that the table has no primary key NSString *wherePart = [NSString stringWithString:[self argumentForRow:[tableContentView selectedRow]]]; @@ -3520,18 +3524,35 @@ isFieldEditable = ([[editStatus objectAtIndex:0] integerValue] == 1) ? YES : NO; } + NSString *fieldType = nil; + NSUInteger *fieldLength = 0; + NSString *fieldEncoding = nil; + // Retrieve the column defintion + for(id c in cqColumnDefinition) { + if([[c objectForKey:@"datacolumnindex"] isEqualToNumber:[aTableColumn identifier]]) { + fieldType = [c objectForKey:@"type"]; + if([c objectForKey:@"char_length"]) + fieldLength = [[c objectForKey:@"char_length"] integerValue]; + if([c objectForKey:@"charset_name"] && ![[c objectForKey:@"charset_name"] isEqualToString:@"binary"]) + fieldEncoding = [c objectForKey:@"charset_name"]; + break; + } + } + SPFieldEditorController *fieldEditor = [[SPFieldEditorController alloc] init]; - [fieldEditor setTextMaxLength:[[[aTableColumn dataCellForRow:rowIndex] formatter] textLimit]]; + [fieldEditor setTextMaxLength:fieldLength]; + [fieldEditor setFieldType:(fieldType==nil) ? @"" : fieldType]; + [fieldEditor setFieldEncoding:(fieldEncoding==nil) ? @"" : fieldEncoding]; id cellValue = [tableValues cellDataAtRow:rowIndex column:[[aTableColumn identifier] integerValue]]; if ([cellValue isNSNull]) cellValue = [NSString stringWithString:[prefs objectForKey:SPNullValue]]; id editData = [[fieldEditor editWithObject:cellValue - fieldName:[[aTableColumn headerCell] stringValue] + fieldName:[[aTableColumn headerCell] stringValue] usingEncoding:[mySQLConnection stringEncoding] - isObjectBlob:isBlob - isEditable:isFieldEditable + isObjectBlob:isBlob + isEditable:isFieldEditable withWindow:[tableDocumentInstance parentWindow]] retain]; if (editData) { @@ -3571,7 +3592,7 @@ return YES; } - + return YES; } @@ -3737,7 +3758,7 @@ row = [tableContentView editedRow]; column = [tableContentView editedColumn]; - // If cell editing mode and editing request comes + // If cell editing mode and editing request comes // from the keyboard show an error tooltip // or bypass if numberOfPossibleUpdateRows == 1 if([tableContentView isCellEditingMode]) { -- cgit v1.2.3