Properties declared without ownership should be redeclarable in class continuati
Originator: | hamish | ||
Number: | rdar://10188718 | Date Originated: | 26-Sep-2011 11:22 PM |
Status: | Open | Resolved: | |
Product: | iPhone SDK [sic] | Product Version: | 5.0 beta 7 |
Classification: | Enhancement | Reproducible: | Always |
26-Sep-2011 11:22 PM Hamish Allan: Summary: Currently, it's only possible to redeclare (in a class continuation) readonly properties as readwrite. If it were possible to redeclare readonly properties with no ownership (i.e. no strong, weak, unsafe_unretained), it would be possible synthesise those properties and yet keep those ownership semantics -- which are, for a readonly property, implementation details -- outside of the public interface. Steps to Reproduce: Attempt to redeclare a property originally declared readonly as e.g. (readonly, strong). Expected Results: No error. Actual Results: Error: illegal redeclaration of property in continuation class 'OLVIconViewCell' (attribute must be 'readwrite', while its primary must be 'readonly') Regression: Sort of (see rdar://problem/9842232) Notes: Thanks!
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Duped
rdar://12964143
workaround
This is not a solution, but in order to be able to use the QuartzDemo you could just cut de property declaration from AppDelegate.me and paste that declaration in AppDelegate.h.
so in the m file we have:
@interface AppDelegate() //@property(nonatomic, readwrite, retain) UIWindow window; @property(nonatomic, readwrite, retain) UINavigationController navigationController; @end
and in the h file we have:
@interface AppDelegate : NSObject
{
IBOutlet UIWindow window;
IBOutlet UINavigationController navigationController;
}
@property(nonatomic, readwrite, retain) UIWindow *window;
@end
works fine, but I suppose there will be cases when this workaround causes unexpected behavior.
Radar: 11068692
http://developer.apple.com/library/ios/#samplecode/QuartzDemo/Introduction/Intro.html
When compiling under Xcode 4.3, the following error occurs in ApDelegate.m:
Illegal redeclaration of property in continuation class 'AppDelegate' (attribute must be 'readwrite', while its primary must be 'readonly')
It sure would be nice if Apple tools were tested against (and worked with) Apple demos. The company is really doing folks like a a great dis-service considering I pay for this privilege.