And what prevent you to simply declare the ivar in the interface instead of letting the compiler generating it ?
I second Andreas. For most cases, the correct place to declare instance variables should be the .m file as they are an implementation detail and not part of the contract with the outside world using the class. The feature of non-fragile instance variables of the modern ABI should make this dream possible. Synthesizing already takes place on the .m side but I also do not know how to gain access to the actual synthesized instance variable in a custom getter. Using objc_getInstanceVariable is not a good alternative as it is far to slow for being used in an on-demand getter. I think, Andreas does not care whether it is theoretically possible for the outside world to access the memory of his instance variables. He merely does not want to cite them is the contract. The Objective-C release notes mention the symbol format OBJC_IVAR_ $_ClassName.IvarName for ivars but the compiler does not seem to understand it. Does anybody know a way to access synthesized instance variables without using the synthesized getter methods? And why isn't there a way to explicitly declare instance variables in the .m file for the new runtime?
Cheers Frank _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com