Fairly newbish question that has been plaguing me for some time now.
I have a class called "Board"
Here is the Interface:
Code:
@interface Board : NSObject
{
int width;
int height;
int numCells;
SpawnPoint *spawnPoint;
Cell *endPoint;
NSMutableArray *cells;
}
I have another class "PathNodeManager"
Code:
@interface PathNodeManager : NSObject
{
@private
NSMutableArray *pathNodes;
Board *gameBoard;
}
@implementation PathNodeManager
- (id)initWithGameBoard: (Board *) newGameBoard
{
self = [super init];
if( self !=nil )
{
self.gameBoard = newGameBoard;
for( int i=0; i<self.gameBoard.numCells; i++)
[self.pathNodes addObject:nil];
}
return self;
}
Now here is the question. When I use self.gameBoard I cannot use auto completion. However, if i just type "gameBoard" auto completion works fine. It seems that dot syntax does not like the "self." in front of it. My understanding is that you should always refer to member variables with a "self.". Should I just give up on dot syntax all together?
Thanks,
Jacob