NSApplication:tryToPerform:with:
Home 目次>ApplicationKit>NSApplication このサイトはこちらに移転しました。

tryToPerform:with:

アクションメッセージを送ってみます


-(BOOL) tryToPerform:(SEL)aSelector
   with:(id)anObject


【返り値】
   BOOLYES/NO
【パラメータ】
   aSelectorセレクタ
   anObjectオブジェクト


【解説】

アクションメッセージを送ってみます。



【例文】


#import "Controller.h"

@implementation Controller

- (
IBAction )pushButton:( id )sender
{
[NSApp setDelegate:
self ];
[NSApp tryToPerform:
@selector (theAction:)
with:
@"sss"
];

}
-(
void )theAction:( id )message
{
NSLog([message description]);
}


@end


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

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

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

良い 

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

Home 目次>ApplicationKit>NSApplication
修正日2007.12.26