Error with Checklists app - please help! [SOLVED]

I’ve just started part two on Checklists, but keep getting this error at page 37 with this code:

"Cannot assign to property: “row” is a get-only property

if indexPath.row == 0 {
label.text = row0text
} else if indexPath.row == 1 {
label.text = row1text
} else if indexPath.row == 2 {
label.text = row2text
} else if indexPath.row == 3 {
label.text = row3text
} else if indexPath.row == 4 {
label.text = row4text
}

I’d really appreciate any help here please.

Thanks,
Rob

Solved!

Bizarrely, by retyping the code again, everything was fine.

I guess it was a hangover from a previous error!

It might have been that you typed = instead of == in one of the if-statements. That would try to assign a value to indexPath.row.

Thanks. I checked that, but it was OK. I think it must have just been a glitch and showed an error where it shouldn’t have been. PS Your 1st tutorial was fantastic, but I must admit I’m finding the second a lot trickier and confusing from pages 70+. I’ll persevere though as I’m sure everyone goes through this stage!