-2

hey I am getting an error accessing unknown class method 'setFirstName' but I am trying to access the variable which are already synthesized here is the code.

User97693321
  • 3,336
  • 7
  • 45
  • 69
vrn
  • 1
  • 3
  • is your property name is firstName ? – Ali3n Jan 15 '12 at 15:08
  • ok when i am trying to add the code ,this showing some error ,what should i do ,and reputation is also below 20 ,so thats why i am unable to add the entire xcode project..... – vrn Jan 16 '12 at 07:26

1 Answers1

1

Your error says "unknown class method"! Are you calling the method to a class or an instance?

Sailesh
  • 25,517
  • 4
  • 34
  • 47
  • Its obvious, you never call an instance. – Ali3n Jan 15 '12 at 15:20
  • @Ali3n: um... what? You can have `MyClass.setFirstName("FOO")` when you mean to say `MyClass c = new MyClass(); c.setFirstName("FOO")`. That sounds like a great blind guess what's wrong to me, since we haven't seen any code. – Mu Mind Jan 15 '12 at 18:07
  • i am trying to access the variables – vrn Jan 16 '12 at 07:23