开发者

passing variables

Ok here is an example of what I'm dealing with at the moment:

@implementation ECHOAppDelegate
 ...
 @end

 @interface PtyView (PtyPrivate)
 -(void)startTask;
 -(void) didRead: (NSNotification *)fileNoty;
 @end

 @implementation PtyView
 ...
 -(void)startTask {
 //starts task
 }
 @end

Now, if I wanted to "trigger" startTask from the ECHOAppDelegate implementation, how would I do th开发者_运维百科at? Now, it says that it wasn't declared.


First, make sure you import the PtyView header. In ECHOAppDelegate.m:

#import "PtyView.h"

Then, assuming you have an instance of PtyView:

[myPtyViewObj startTask];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜