Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Simplicated

macrumors 65816
Original poster
Sep 20, 2008
1,422
254
Waterloo, Ontario, Canada
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.
 

BorgCopyeditor

macrumors newbie
Jan 7, 2009
14
0
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.

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?
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,566
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.

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".
 

BorgCopyeditor

macrumors newbie
Jan 7, 2009
14
0
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.

What about this:
Code:
[htmlString appendString:[entryToPrint description]];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.