Re: NSImage -isValid not always right?
Re: NSImage -isValid not always right?
- Subject: Re: NSImage -isValid not always right?
- From: "Peesapaty Ramesh" <email@hidden>
- Date: Fri, 12 Apr 2002 22:26:41 +0530
Hi,
i am trying to display a image in tableView .
the code is as follows.
NSImageCell *myImageCell;
NSTableColumn *col = [folderList
tableColumnWithIdentifier:@"folder"];
NSImage *myImage = [[NSImage alloc]
initWithContentsOfFile:@"folder.gif"];
if ([myImage isValid]){
NSLog(@"Image is valid");
}
if ([myImage isKindOfClass:[NSImage class]]){
NSLog(@"YES");
}
myImageCell = [[NSImageCell alloc] init];
[myImageCell setImage:myImage];
[col setDataCell:myImageCell];
when it is setting value in the tablecolumn it is giving following
error.
"NSImageCell's object value must be an NSImage."
am i missing anything.
thanks in advance.
Ramesh
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.