From: Jonathan P. <jp...@dc...> - 2005-11-04 23:23:15
|
> employeeID = 123 # not self.employeeID > puts employeeID > puts self > self.employeeID = 123 # using self.employeeID > puts employeeID > puts self Ah, my fault for getting this wrong in my earlier message. Ruby assumes 'employeeID = 123' is a local variable assignment. Hence, the 'puts employeeID' simply retrieves the local variable assigned on the preceding line. CoreData or RubyCocoa are never involved. In your second example, the first line directly calls the setter (self.employeeID=) and the second line indirectly calls the getter (self.employeeID) since no local variable with that name (employeeID) has been defined yet. Hope that makes sense. Glad to hear that things are beginning to work. Jonathan |