views:

33

answers:

1

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 that? Now, it says that it wasn't declared.

Any ideas?

Thanks, Elijah

A: 

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

#import "PtyView.h"

Then, assuming you have an instance of PtyView:

[myPtyViewObj startTask];
mipadi
Ok thanks! but for some reason I'm getting this error: 'PtyView' may not respond to '-startTask' Here is the code I'm using: PtyView *ptyviewobject = [[PtyView alloc] init]; [ptyviewobject startTask];
Elijah W.