• 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
Re: Target action isn't linking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Target action isn't linking (From: Tristan Harris <email@hidden>)

  • Prev by Date: [ANN] QTKit v 0.1.1
  • Next by Date: Re: Question
  • Previous by thread: Target action isn't linking
  • Next by thread: [ANN] QTKit v 0.1.1
  • Index(es):
    • Date
    • Thread