CocoaDev

Edit AllPages

Required for CCDTextField (again).

Used for getting the selectedRange when the field editor returns garbage.

// CCDPTextView.h #import <AppKit/AppKit.h>

@interface CCDPTextView : NSTextView {}

// CCDPTextView.m #import “CCDPTextView.h”

// This kinda sucks but it’s not too terrible. @implementation CCDPTextView

static NSRange myPrvtSelectedRange;

You will need to modify your main.m file to look like this…

#import <Cocoa/Cocoa.h> #import “CCDPTextView.h”

int main(int argc, const char *argv[]) { [CCDPTextView poseAsClass:[NSTextView class]]; return NSApplicationMain(argc, argv); }