Target action isn't linking
Target action isn't linking
- Subject: Target action isn't linking
- From: Tristan Harris <email@hidden>
- Date: Sun, 2 Dec 2001 19:03:57 -0800
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?
-Tristan