Nice read, there are a lot of things in it that you'd probably only get by playing around a long time.
Or -- with no disrespect to Scott -- by reading Apple's documentation...
(I'm glad though that Scott is able to present this material from another perspective.)
The documentation also covers managed object accessor methods -- including use of the dot syntax -- in some detail.
For several example projects that use Objective-C 2, see this page. See also this example which illustrates Objective-C 2 language features, garbage collection, and integration with Core Foundation.
Public Properties with Private Setters
One important point, though, that I'm afraid Scott doesn't address here is that by default properties are atomic.
This means that the code example shown for Movie is not equivalent to the declared property: @property (readonly) NSString* summary;
should be @property (readonly, nonatomic) NSString* summary;
by mmalc — Nov 05
Or -- with no disrespect to Scott -- by reading Apple's documentation...
(I'm glad though that Scott is able to present this material from another perspective.)
The documentation also covers managed object accessor methods -- including use of the dot syntax -- in some detail.
For several example projects that use Objective-C 2, see this page. See also this example which illustrates Objective-C 2 language features, garbage collection, and integration with Core Foundation.
Public Properties with Private Setters
One important point, though, that I'm afraid Scott doesn't address here is that by default properties are atomic.
This means that the code example shown for Movie is not equivalent to the declared property:
@property (readonly) NSString* summary;
should be
@property (readonly, nonatomic) NSString* summary;
For more details, see Performance and Threading.
mmalc