• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Target action isn't linking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Target action isn't linking
      • From: Vince DeMarco <email@hidden>
  • Prev by Date: Re: ANN: Pacifist 1.0 Beta 1 Released
  • Next by Date: [ANN] QTKit v 0.1.1
  • Previous by thread: Re: Question
  • Next by thread: Re: Target action isn't linking
  • Index(es):
    • Date
    • Thread