I mean it
Code is Art
Profile
Posts: 66
Reg: Feb 20, 2012
London
1,060
03/20/12 09:47 AM (13 years ago)

Game Center: incomplete implementation

Hmmmm, does anyone know why I get this error? (in the line of @implementation BT_screen_quiz) Regards, Dan #import "BT_screen_quiz.h" @implementation BT_screen_quiz @synthesize saveAsFileName, downloader, didInit; /* quiz properties */
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/20/12 10:06 AM (13 years ago)
Incomplete implementation errors / warning are always related to the relationship between the .h and the .m file for any given class. BT_screen_quiz in this case. Try to get your head around this. The .h file has one purpose (in essence), to "teach" the compiler what you "plan to do" in the .m file. Another way to say it, write the .h file, then write the .m file. The idea is that the .h file, call the Interface, is a set of instructions for the compiler. That puts it in simple terms but basically that's the idea. Developers list all the properties (variables) that they will use in the .m file, called the Implementation, along with all the methods they will be writing. It's a way to formalize your code. Not all languages use an Interface and Implementation relationship, Objective C does. In the old' days of iOS Development (yes, there are olden days already) it wasn't too important to get this 100% accurate and be super-anal about matching the .h "rules" with the .m "methods." This means that lots of old Objective C code is floating around that didn't follow this paradigm as well as it should, the quiz screen is a perfect example of this. Without looking, I would be that your compiler is set to warn you about ALL issues, as tiny as they may be, and this issue is coming up. The fix is easy (usually): a) Open the .m file for the quiz. Open it in it's own window so you can see the .m and the .h next to each other. b) For each method in the .m file you should see a matching method declared in the .h file. Example: in the .m file you'll see method called: -(void)parseScreenData:(NSString *)theData, this means you should also see a method in the .h file like -(void)parseScreenData:(NSString *)theData For newcomers, it's tough sometimes to undrestand all of this. Hang with it, it gets easier. The method names in the .m file end with an open curly brace because the actual code for each method goes inside the curly braces, they end with a closing curly brace. In the .h file the method names end with a semicolon. This is because the .h doesn't contain any actual code for each method, on the method names. Again, the compiler looks at the .h file to "learn" about the .m file. If a method in the .m file exists but is not listed in the .h file, add it to the .h file under all the other listed methods. The order they are listed doesn't matter. I'll bet this makes the error / warning magically go away. If so, paste the method name you found in .m that didn't exist in .h and we'll update the project to save the next guy some pain ;-)
 
I mean it
Code is Art
Profile
Posts: 66
Reg: Feb 20, 2012
London
1,060
like
03/20/12 10:11 AM (13 years ago)
Hi David, Thank you very much for this in-depth explanation! Much appreciated! I will try to follow your instructions when I get home tonight... Best wishes, Dan
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.