Re: Target action isn't linking
Re: Target action isn't linking
- Subject: Re: Target action isn't linking
- From: Vince DeMarco <email@hidden>
- Date: Sun, 2 Dec 2001 20:49:56 -0800
On Sunday, December 2, 2001, at 07:03 pm, Tristan Harris wrote:
Hi, I'm a newbie to Cocoa, so bear with me...
I'm trying to make a button link to a function inside my controller, here'
s the function:
-(IBAction)chooseFile:(id)sender
{
int result;
NSArray *fileTypes = [NSArray arrayWithObject:@"mp3"];
NSOpenPanel *panel = [NSOpenPanel openPanel];
result = [panel runModalForTypes: fileTypes];
if (result == NSOKButton) {
[self inspectFile:
[[panel filenames] objectAtIndex:0]];
}
}
Now... I don't see how there could be a problem with the function,
because I copied the code from another application. Mind you also that I
have defined "inspectFile" so its not like I'm calling a function that
doesn't exist. I would think that the problem is not code related, but
here are the errors I'm getting from ProjectBuilder when I run:
2001-12-02 19:02:00.629 SpeedMP3[719] Unknown class `MP3Controller' in
nib file, using `NSObject' instead.
2001-12-02 19:02:00.632 SpeedMP3[719] Could not connect the action
chooseFile: to target of class NSObject
Anyone able to help?
What its saying is that the class MP3Controller is not known, are you sure
you have that class linked into your application??? It doesn't look like
it from the message above.
vince