appendString (arguments?) problem

Discussion in 'Mac Programming' started by Simplicated, Jan 11, 2009.

  1. Simplicated macrumors 65816

    Simplicated

    Joined:
    Sep 20, 2008
    Location:
    Waterloo, Ontario, Canada
    #1
    I can't describe my problem... Please help me.

    Code:
    for (AppController *entryToPrint in candidates) {
    		[htmlString appendString:@"%@", entryToPrint];
    	}
    It gives warning and the program won't run.

    Thank you very much.
     
  2. BorgCopyeditor macrumors newbie

    Joined:
    Jan 7, 2009
    #2
    What warning does it give? What is the value of htmlString inside your method? (You can find out by setting a debugger breakpoint on this line, and looking at its value before executing the line.) Is it in scope inside your method? Has it been declared, but not initialized?
     
  3. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  4. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #4
    If you can't describe the problem, that is a problem.

    You say "It gives warning". Who or what is "it"? What warning? Maybe you could copy the warning into your message? How is anyone supposed to know what the problem is if you don't say which warning?

    You say "program won't run". Does that mean you can't start it, or does it crash, or does it not do what you want it to do?

    One hint: Double click an appendString, then "Lookup selected text in API reference".
     
  5. BorgCopyeditor macrumors newbie

    Joined:
    Jan 7, 2009
    #5
    What about this:
    Code:
    [htmlString appendString:[entryToPrint description]];
     

Share This Page