Changeset 393


Ignore:
Timestamp:
02/23/08 08:46:47 (12 years ago)
Author:
Nicholas Riley
Message:

APEMain.m: Fix exception on menuForEvent: in Xcode 3 rich text editor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ICeCoffEE/ICeCoffEE/APEMain.m

    r392 r393  
    128128    if (bundleID != NULL) {
    129129        if (ICCF_CFBundleIDMatches(bundleID, CFSTR("com.apple.xcode"))) {
    130             ICCF_PatchMethod("PBXTextView", "ICeCoffEEMenuOnly", "ICeCoffEEMenuSuper", "menuForEvent:");
    131             ICCF_PatchMethod("XCSourceCodeTextView", "ICeCoffEEMenuOnly", "ICeCoffEEMenuSuper", "menuForEvent:");
    132             ICCF_PatchMethod("XCTextView", "ICeCoffEE", "ICeCoffEESuper", "mouseDown:");
     130            if (ICCF_PatchMethod("XCTextView", "ICeCoffEE", "ICeCoffEESuper", "mouseDown:")) {
     131                ICCF_PatchMethod("XCSourceCodeTextView", "ICeCoffEEMenuOnly", "ICeCoffEEMenuSuper", "menuForEvent:");
     132                ICCF_PatchMethod("XCDiffTextView", "ICeCoffEE", "ICeCoffEESuper", "mouseDown:");
     133                ICCF_PatchMethod("XCDiffTextView", "ICeCoffEE", "ICeCoffEESuper", "menuForEvent:"); // subclass of PBXTextView; patching both is bad
     134            } else {
     135                ICCF_PatchMethod("PBXTextView", "ICeCoffEEMenuOnly", "ICeCoffEEMenuSuper", "menuForEvent:");
     136            }
    133137            ICapeprintf("ICeCoffEE APE: loaded in PBXTextView / XCTextView for Xcode\n");
    134138            shouldLoadInNSTextView = NO;
Note: See TracChangeset for help on using the changeset viewer.