Design Element
Comment on "A Quick Objective-C 2.0 Tutorial: Part II"
by Blain — Nov 05
What's wrong with the old opaque C struct pointer?
typedef struct ourHiddenData ourHiddenDataStruct; @interface ourFunkyClass: NSObject { ourHiddenDataStruct *doNotTouch; }
And then define the fields in your nonheader code. (If you're really perverse, C++ compilers won't fuss about redefining a declared struct into a class, so you can have the plain Obj-C headers use pointers that Obj-C++ code later uses as a C++ class.)

Ahh, Cocoa. Where two of the most-talked about subjects are how to access Apple's undocumented frameworks and interfaces, and how to obfuscate and obscure your own data that would be accessible by default. In short, we know the arts of making private public and public private.
Back to "A Quick Objective-C 2.0 Tutorial: Part II"
Design Element

Copyright © Scott Stevenson 2004-2015