Previous 1 2 Next 25 Replies Latest reply: May 5, 2012 10:22 AM by andyzoom01 Go to original post
  • krytaxion2 Level 1 Level 1 (0 points)

    I did the same thing, added files for "MyViewController", then removed them, then added them again in a different place in the project. Then once I got to the point where I was supposed to add the actions, it gave me this error.

     

    I was able to get it to work properly after I went into both MyViewController.h and MyViewController.m and slightly modified and saved those files. I just added a couple lines of whitespace in both the @interface/@end and @implementation/@end blocks, and then tried to set up the action connection again, and it magically worked.

  • admiralc Level 1 Level 1 (0 points)

    This worked for me too

  • BlackPointCoder Level 1 Level 1 (0 points)

    Quitting XCode solved it for me too.

    In fact when I quit, XCode had a crash bug and did not exit cleanly.

    It restarted with all my code intact and I was able to drag and create the new Action as advertised.

     

    Message was edited by: BlackPointCoder

  • Raptor_007 Level 1 Level 1 (0 points)

    Restarting Xcode worked for me as well thankfully.

     

    Odd though, imagine this happened while coding a project of your own where you don't have instructions that tell you what should happen next.  I wouldn't immediately be blaming the software, I'd just assume I'd missed something when really it was the compiler's fault.

     

    A good lesson that I'll be keeping in mind for future projects.

  • asookazian Level 1 Level 1 (0 points)

    just experienced this problem in Xcode 4.1.  restarted and the problem is gone and I was able to CTRL-click drag and Xcode created the code in my .h file:

     

     

    {code}- (IBAction)viewButton1:(id)sender;{code}

  • jb1098 Level 1 Level 1 (0 points)

    I just got this problem after creating a new file with the same name as a previously deleted file. Fixed it by changing the header and implementation files (just by adding a space at the end of a line), and then saving them.

  • Hagin Level 1 Level 1 (0 points)

    I had the same problem and just solved it that way:

    for some reason the mainController file, that caused the problem had a localization (in the right menu) - in the english folder.

    I just deleted it by pressing the minus sign and it worked.

    just make sure you have a copy of the file in the main folder (that holds the english folder too).

  • Aleksei Guzev Level 1 Level 1 (0 points)

    Hi,

    Just select 'File's owner" and in "Identity inspector" set the right Controller class instead of NSObject.

  • Bidli Level 1 Level 1 (10 points)

    Reindexing the project was the only thing that helped in my case. Here's how to do it: http://xcodebook.com/2011/04/code-nonsense/

  • ZeeshanKhan Level 1 Level 1 (0 points)

    Command + S saved me

  • andyzoom01 Level 1 Level 1 (0 points)

    Re-indexing the project (as Bidli) references was the only thing that worked for me.

Previous 1 2 Next