NSDocument:hasUndoManager
Home 目次>ApplicationKit>NSDocument

hasUndoManager

アンドゥマネージャーを持っているかを返します


-(BOOL) hasUndoManager


【返り値】
   BOOLYES/NO


【解説】

アンドゥマネージャーを持っているかを返します。



【例文】




#import "MyDocument.h"

@implementation MyDocument
//Nibファイル名を返す
- (NSString *)windowNibName
{
return @"MyDocument";
}
//Nibからロードされた時に実行される
- (void)windowControllerDidLoadNib:(NSWindowController *) aController
{

if ([self hasUndoManager]){
NSLog(@"YES");
}else{
NSLog(@"NO");
}

[super windowControllerDidLoadNib:aController];

}
//データを保存するとき
- (NSData *)dataRepresentationOfType:(NSString *)aType
{

return nil;
}
//データをロードするとき
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType
{

return YES;
}

@end


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSDocument
修正日2006.12.26