Zeroing in on the difference...
Pitfall here again... Armed with the comment that it should work I made some progress. I was trying to init the constant array in the interface declaration where I establish my globals. It doesn't let me populate the array there.
On the other hand, the C syntax works perfectly inside the implementation declaration, when used locally within a method.
I could use NSArray, but it seemed overkill to alloc a memory region, initWithObjects, and then have to purge - all to make a 10 byte table.
I guess it makes sense that Objective C won't let me embed a code-like construct in the declaration area. But being new to the language that didn't jump out at me.
Thanks for the replies.
|