On Jul 15, 2013, at 2:38 PM, Uli Kusterer wrote:

> On Jul 15, 2013, at 8:31 PM, Alex Zavatone <z...@mac.com> wrote:
>> DownloadOperation.h
>> @interface DownloadOperation : NSOperation
>> - (id)initWithURL:(NSURL*)url;
>> @property (nonatomic, readonly) NSError *error;
>> 
>> DownloadOperation.m
>> #import "DownloadOperation.h"
>> 
>> @interface DownloadOperation () <NSURLConnectionDelegate>
>> @property (nonatomic, strong) NSURL* url;
>> @property (nonatomic, strong) NSURLConnection* connection;
>> @property (nonatomic, strong) NSMutableData *buffer;
>> @property (nonatomic) long long int expectedContentLength;
>> @property (nonatomic, readwrite) NSError *error;
> 
> 
> That's not 2 properties, that is one being declared twice, once for external 
> users (in the header) and once for internal use by the class. External users 
> are only supposed to read the property, while the class itself of course has 
> to be able to actually store a value in it, so it redeclares it from readonly 
> to readwrite in a class continuation. This is pretty much the only valid way 
> to declare the same property twice, changing anything else on the property 
> will give an error message, but readonly -> readwrite is OK.
> 
> Cheers,
> -- Uli Kusterer
> "The Witnesses of TeachText are everywhere..."
> http://www.zathras.de

Hmm, so if this is the legit form, when I do an @synthesize on error in the .m 
file, this error appears:

Automatic Reference Counting Issue: ARC forbids synthesizing a property of an 
Objective-C object with unspecified ownership or storage attribute



_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to