the xcode follies part one: the id object
Or should this more aptly be named “the objective-c follies”? Seriously. This is an entirely new code structure and I’m having a hard time grasping even the simplest concepts. I mean, I understand how to create algorithms in code and I understand objects, classes and methods. What I’m trying to understand are the specific underlying principles in Objective-C, XCode 3.0 and Cocoa that vary greatly from what I am accustomed to.
The biggest example to date is the ‘id’ object. I think I’m starting to understand, but it would REALLY be nice for someone out in virtual space…..actually, ANYONE out in virtual space to post a finite answer in layman’s terms for those of us who are trying to soak all of this in (NOTE: This is foreshadowing to a day when I finally understand it fully….I’ll be that guy….it’s in my DNA).
What I am understanding ‘id’ that is declared without a type until runtime. Almost like a placeholder object. Typically this is given the name ’sender’. At least that’s what I’m seeing thus far…..some random reference out on the web stated that this was a Cocoa convention.
I think the difficulty I’m having is that the syntax in the header files and implementation files seems to change depending on context. More on this later as it sinks in more….
FYI, for anyone seeking tangible information, I wouldn’t look here just yet. ha! But check back soon. I’ll get it down well enough before long……