Object cannot be set - either readonly property or no setter found

Discussion in 'iOS Programming' started by beesbane, Oct 23, 2010.

  1. beesbane macrumors newbie

    Oct 16, 2010
    I followed a tutorial verbatim, and received this error.


    I then went to troubleshoot this error searching through forum pages and couldn't find the solution.

    This is targeting a class

    It is not specifically set to readonly.
    I don't think it has a setter.

    please help.
  2. ianray macrumors 6502

    Jun 22, 2010
    We need to see code in order to help you. (Sorry I'm not going to watch a 6 minute YouTube Video.)

    Given the error message "Object cannot be set - either readonly property or no setter found", then your statement already suggests the answer...? In other words, maybe a setter is needed.

  3. Don Kosak macrumors 6502a

    Don Kosak

    Mar 12, 2010
    Hilo, Hawaii
    Without code, it's just a guess.

    But, make sure to check your .m file for an "@synthesize foo;" Normally, that's what causes that type of message.

    If you have "@property (nonatomic, retain) NSString *foo;" in your .h file. Check the corresponding .m file for the "@synthesize foo;" -- as that is what generates the setter and getter for "foo".

    Hope that makes sense.

Share This Page