ACEView - 在Cocoa應用中嵌入ACE編程器
在您的Cocoa應用程序中使用帶勁的ACE編輯器。
#import "Cocoa/Cocoa.h"import "ACEView/ACEView.h"
@interface AppDelegate : NSObject <NSAPPLICATIONDELEGATE, aceviewdelegate=""> { IBOutlet ACEView *aceView; }
@property (assign) IBOutlet NSWindow *window;
@end
import "AppDelegate.h"
import "ACEView/ACEView.h"
import "ACEView/ACEModeNames.h"
import "ACEView/ACEThemeNames.h"
@implementation AppDelegate
(void) applicationDidFinishLaunching:(NSNotification *)aNotification {
// Note that you'll likely be using local text [aceView setString:[NSString stringWithContentsOfURL:[NSURL URLWithString:@"
error:nil]];
[aceView setDelegate:self]; [aceView setMode:ACEModeHTML]; [aceView setTheme:ACEThemeXcode]; [aceView setShowInvisibles:YES]; }
(void) textDidChange:(NSNotification *)notification { NSLog(@"%s", PRETTY_FUNCTION); }
@end</NSAPPLICATIONDELEGATE,></pre>
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!