bugGNUstep - Bugs: bug #13046, NSTableView data source providing...

Group
 
 

bug #13046: NSTableView data source providing an NSImage is buggy

Submitter:  Rob Burns <rburns>
Submitted:  Tue 10 May 2005 11:39:07 AM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Ready For Test
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 20 May 2005 10:00:30 AM UTC, comment #5: 

Reported as resolved

Fred Kiefer <FredKiefer>
Group Member
Fri 20 May 2005 02:56:15 AM UTC, comment #4: 

the fix makes the test application and the app I was working on behave as expected. So, seems good to me.

Thanks
Rob

Rob Burns <rburns>
Thu 19 May 2005 11:56:23 AM UTC, comment #3: 

Thanks to the provided test application I was able to confirm that the problem was caused by the [NSImageCell setObjectValue:] method not handling a nil argument as unsetting the image. This has been fixed in CVS.
Could you please confirm that the problem has been resolved for you?

Fred Kiefer <FredKiefer>
Group Member
Thu 19 May 2005 10:10:52 AM UTC, comment #2: 

http://www.eskimo.com/~pburns/misc/Testing-20050519.tar.gz

that url points to a collection of GSTest bundles for NSTableView related problems. NSTableView-Images is for this one.

Thanks
Rob

Rob Burns <rburns>
Wed 18 May 2005 08:26:13 PM UTC, comment #1: 

Could you please provide a full example program to reproduce this behaviour? I am willing to analyse the problem, but wont have the time to reproduce the problem.

My current expectation is that the root cause may be the way the method setObjectValue: on NSImageCell deals with nil arguments. I would expect that the problem goes away, if we treat them the same as parameters of type NSImage.

Fred Kiefer <FredKiefer>
Group Member
Tue 10 May 2005 11:39:07 AM UTC, original submission:  

If I have some code similar to this:

- (id)            tableView: (NSTableView *) aTableView
  objectValueForTableColumn: (NSTableColumn *) aTableColumn
                        row: (int) rowIndex
{

if( [[aTableColumn identifier] isEqualToString: @"Text"] )
{
  return [data objectAtIndex: row];
}
if( [[aTableColumn identifier] isEqualToString: @"Pic"])
{
  if([[data objectAtIndex: row] length] > 5)
  {
    return [NSImage imageNamed: @"Star.tiff"];
  }
}
return nil;

}

in my data source, all rows after the first row in which the image is returned will have an image displayed. And scrolling the tableView around will fill the Pic column of every row with images (even those at the top that were previously blank). The Pic column's cell is NSImageCell, set in gorm.

Rob Burns <rburns>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-05-20 FredKiefer Open/ClosedIn Test Closed
2005-05-19 FredKiefer StatusNone Ready For Test
    Open/ClosedOpen In Test
2005-05-18 FredKiefer Assigned toNone FredKiefer

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code