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

    Joined:
    Oct 16, 2010
    #1
    I followed a tutorial verbatim, and received this error.

    http://www.youtube.com/watch?v=fsj-ghv5tbA&feature=related

    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

    Joined:
    Jun 22, 2010
    Location:
    @
    #2
    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

    Joined:
    Mar 12, 2010
    Location:
    Hilo, Hawaii
    #3
    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