Re: TableView displaying a zillion empty rows Problem Solved!

2009-07-09 Thread Brian Hughes
I really appreciate all the help, it kept me searching for an answer. Ron Fleckner was the closest to diagnosing the problem. I had plugged the unit into the wall socket but I forgot to turn the breaker back on. I had failed to call reloadData. Sorry Andy, I didn't find the answer in the

Re: TableView displaying a zillion empty rows Problem Solved!

2009-07-09 Thread Andy Lee
Argh, when I think of all the times reloadData has been the *first* suggestion from the list in response to an NSTableView problem! Thanks for keeping us posted. :) --Andy On Jul 9, 2009, at 10:43 PM, Brian Hughes wrote: I really appreciate all the help, it kept me searching for an

Re: TableView displaying a zillion empty rows

2009-07-08 Thread Quincey Morris
On Jul 7, 2009, at 22:36, Brian Hughes wrote: 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:

Re: TableView displaying a zillion empty rows

2009-07-08 Thread Andy Lee
On Jul 8, 2009, at 1:36 AM, Brian Hughes wrote: So I changed my code to reflect Quincy Morris's recommendations. Something removed the indentation from your code, so I've re-added it below: -(int) numberOfRowsInTableView: (NSTableView *)aTableView { if (aTableView ==

Re: TableView displaying a zillion empty rows

2009-07-08 Thread Florian Soenens
Hi Brian, you seem to only check for gameScoresTableView and playerManagementTableView. Are your Controller outlets actually connected to these 2 NSTableViews? Regards, Florian. On 06 Jul 2009, at 20:14, Brian Hughes wrote: Hi, I have two tableViews in my application. One works

Re: TableView displaying a zillion empty rows

2009-07-08 Thread Andy Lee
-(id) tableView: (NSTableView *) aTableView objectValueForTableColumn: (NSTableColumn *) aTableColumn row: (int) rowIndex { id returnValue = nil; if (aTableView == gameScoresTableView) { LNPlayer *currentPlayer = [playersArray objectAtIndex:

Re: TableView displaying a zillion empty rows

2009-07-08 Thread Quincey Morris
On Jul 8, 2009, at 00:31, Andy Lee wrote: //returnValue = [player valueForKey: [aTableColumn identifier]]; if ([[aTableColumn identifier] isEqualTo: @firstName_] == YES) returnValue = [player firstName_]; else if

Re: TableView displaying a zillion empty rows

2009-07-08 Thread Mac First
On Jul 8, 2009, at 12:31 AM, Andy Lee wrote: if ([[aTableColumn identifier] isEqualTo: @firstName_] == YES) returnValue = [player firstName_]; else if ([[aTableColumn identifier] isEqualTo: @lastName_]) returnValue

RE: TableView displaying a zillion empty rows

2009-07-07 Thread Brian Hughes
Yet clearly later in the method returnValue is set to 22 via count method applied to my array. In my debugger and in my NSLogs returnValue is 22. But you are only logging the case where it does return 22, so what would you expect? Instead, try moving the NSLog to log the *actual*

Re: TableView displaying a zillion empty rows

2009-07-07 Thread Quincey Morris
On Jul 7, 2009, at 09:35, Brian Hughes wrote: As I debug I can clearly see that the program is not going through the other path. It is definitely traveling through the path that I am logging. Everything says that returnValue is 22 except the actual tableView. By the way when the program

Re: TableView displaying a zillion empty rows

2009-07-07 Thread Steve Christensen
be displayed in the UI. The latter is determined by the physical layout of the table in IB as well as any resizing restrictions you put on the table when, say, the window is grown/shrunk. HTH, steve CC: cocoa-dev@lists.apple.com From: puns...@mac.com Subject: Re: TableView displaying a zillion

RE: TableView displaying a zillion empty rows

2009-07-07 Thread Brian Hughes
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

Re: TableView displaying a zillion empty rows

2009-07-06 Thread Greg Guerin
Brian Hughes wrote: -(int) numberOfRowsInTableView: (NSTableView *)aTableView { int returnValue; if (aTableView == gameScoresTableView) //This works as expected { if (currentIndex_= 0) { LNPlayer *currentPlayer =

Re: TableView displaying a zillion empty rows

2009-07-06 Thread Steve Christensen
On Jul 6, 2009, at 11:50 AM, Greg Guerin wrote: Brian Hughes wrote: -(int) numberOfRowsInTableView: (NSTableView *)aTableView { int returnValue; if (aTableView == gameScoresTableView) //This works as expected { if (currentIndex_= 0)

RE: TableView displaying a zillion empty rows

2009-07-06 Thread Brian Hughes
and now that I think about it I don't really want to find out so I changed it to 0. Thanks, Brian CC: cocoa-...@lists.apple.comfrom: puns...@mac.com Subject: Re: TableView displaying a zillion empty rows Date: Mon, 6 Jul 2009 12:32:38 -0700 To: brian5hug...@hotmail.com On Jul 6, 2009, at 11:50 AM

Re: TableView displaying a zillion empty rows

2009-07-06 Thread Graham Cox
On 07/07/2009, at 1:20 PM, Brian Hughes wrote: Thanks for your help. You were right it is acting like an unintialized local variable. However when I initialize returnValue to 0 at the beginning of the method. int returnValue = 0; I got some new bizarre behavior. In Interface Builder the