Are C++ initializers called in Objective-C synthesized properties? Meaning if I write a custom initializer for creation from another object of the same type (C++) does the synthesized property setter call that initializer?
A:
I assume by initializer you actually mean a C++ constructor. In a synthesized setter the copy constructor for the C++ object is called.
Sven
2010-09-03 20:23:20
You can use a C++ class with a zero-argument constructor as an Objective-C instance variable. http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocCPlusPlus.html
Chuck
2010-09-03 20:41:37
Sorry, I missed that. Fixed my answer. Has been a while since I worked with Objective-C++.
Sven
2010-09-03 21:22:01