-stringForObjectValue: gets invoked many, many times


#1

In doing the exercises and challenges in the book, I often add many NSLog()'s to see what is going on under the hood (as much as can be seen at the application level). In working on the ColorFormatter class, I noticed that stringForObjectValue: gets invoked 11 times after I press enter in the text field after having typed in the name of a color. Why is this?

I can see that -stringForObjectValue: also gets invoked any time that I pick a new color in the color picker; this makes sense. However, stringForObjectValue: getting invoked 11 times (in addition to getObjectValue: getting invoked a few times) when I enter a color name (and press enter) in the text field makes no sense to me.

Any enlightenment would be appreciated.