First off let me say thanks for a fantastic book! Very informative and I’m learning a lot but I’m hung up on one thing I can’t understand. Take the following code:
-(void)addAsset:(BNRAsset *)a;
{
//Is assets nil?
if(!_assets){
//create the array
_assets = [[NSMutableArray alloc]init];
}
[_assets addObject:a];
a.holder = self;
}
I understand that this is a instance method that BNRAsset objects use to place objects into an array. I don’t understand the first line though. Does that line mean that addAsset is being called on a pointer to a BNRAsset object? Why is the “a” outside the ()?
Thanks for the help!