Theocacao
Leopard
Design Element
Comment on "A Quick Objective-C 2.0 Tutorial: Part II"
by Drew McCormack — Nov 04
movie.title = @"The Hudsucker Proxy"; //Works!

I wish it did. I just tested this too, and get the same error at runtime, ie, that setTitle: doesn't exist. This makes sense, because the dot syntax is just a short-hand for calling setTitle: directly.

In fact, I can remember pretty clearly that Apple stated at WWDC that you should be careful not to assume dot-syntax and KVC are interchangeable. They are actually totally unrelated.

Drew
Back to "A Quick Objective-C 2.0 Tutorial: Part II"
Design Element

Copyright © Scott Stevenson 2004-2015