objective c - Newbie question -multiple parameters -


i trying implement private method takes nsmutabledictionary , player object parameters. private method, place exists in ".m" file.

it declared as

-(void) incrementscore: (nsmutabledictionary*) scoreboard  forplayer: ( player* ) player { 

and call follows :

      [ self incrementscore:deucescore forplayer:p]; 

however,it won't compile -

may not response message -incrementscore:forplayer

i'm not sure error lies - need declare method in ".h" file, or elsewhere in ".m" file, or have got syntax wrong?

the compiler needs find declaration method somewhere before use it. done in 3 way:

  1. declare method in (public) @interface class in .h file .
  2. declare method in class extension (a semi-private @interface, @ top of .m files).
  3. define method somewhere in @implementation before first use of it.

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -