start in NSOperation
start in NSOperation
- Subject: start in NSOperation
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Mon, 06 Jan 2014 17:26:53 +0700
MyOperation is a subclass of NSOperation:
#import "MyOperation.h"
@interface MyOperation()
@property (assign) NSUInteger start;
@end
@implementation MyOperation
- initWithStart:(NSUInteger)s ;
{
self = [ super init ];
if ( self == nil ) return nil;
_start = s;
return self;
}
- (void)main
{
NSLog(@"%s start %lu",__FUNCTION__, self.start );
}
@end
Then I created one instance of MyOperation and added it to an NSOperationQueue and nothing happened - no NSLog to be seen.
When I changed the property from "start" to "stArt" then all became fine. Obviously "start" is a word one should not use with NSOperations (no idea why).
But: should there not be some compiler warning? Using Xcode 5.0.2.
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden