UITableView doubt


I have this lingering doubt:

you send [p description] to get a description of the possession object.

Where Im confused is that we are asking for the return of a method from the Possession Class. How does it know to return the possessionName, serialNumber, valueInDollars and dateCreated for that specific p? Shouldnt the method signature be something like [p description:(Possession*)p]; or something, in order to tell the method that we are asking for the description of that specific p instance?


The reason that we don’t need to specify which Possession we’re talking about is because the description method is an instance method (which you can determine from the - (minus) sign in front of the method signature. If it was a class method (like [[PossessionStore defaultStore] createPossession]) it would be prefixed with a + and we would indeed need to pass it a Possession instance for it to give us the appropriate string.

Make sense?