So I changed my code to reflect Quincy Morris's recommendations.
-(int) numberOfRowsInTableView: (NSTableView *)aTableView {if (aTableView == 
gameScoresTableView) //This works as expected {
LNPlayer *currentPlayer = [playersArray objectAtIndex: currentIndex_]; 
NSMutableArray *tempGameRecordsArray = [NSMutableArray arrayWithArray: 
[currentPlayer gameRecordsArray]];return [tempGameRecordsArray count];}
else if (aTableView == playerManagementTableView) {NSLog (@"playersArray count 
= %d", [playersArray count]);  //[playersArray count] = 22return [playersArray 
count];}  else {NSLog (@"Invalid table view");return 0;}}
Since I only have two table views in my program the "Invalid table view" is 
never called.  The first table view gameScoresTableView works perfectly.  The 
playerManagementTableView does not.  I do not create the table views 
progammatically. I use IB. I do not use bindings. My delegates are set 
correctly and are the same for both table views.  I don't know enough about 
programming nor am I arrogant enough to think that there is something wrong 
with NSTableView.  I have always thought the error was in my code.  That is 
precisely why I asked for help.  I couldn't seem to figure out what to do next. 
 I have learned more about table views so I appreciate all the help.  However 
it still does not work.  I am going to try removing infrastructure and see if I 
can find the problem.  Any other suggestions would be welcome.  If I figure it 
out I will let you know.  Meanwhile I am going to shine that streetlight on the 
bottle of beer on my desk.  Maybe the solution is in there.
}


_________________________________________________________________
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290_______________________________________________

Cocoa-dev mailing list ([email protected])

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

This email sent to [email protected]

Reply via email to