0
  1. First i changed my NSTableView to view based and created an IBOutlet of my NSTableView.
  2. Then i dragged the Image & Text Table Cell View to it.
  3. After that i changed the NSImageView that's inside that cell view to my custom NSImageView subclass: 'PVAsyncImageView'.
  4. I imported it on my .h.

And i have this code:

- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
    NSTableCellView *result = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self];
    [[result imageView] downloadImageFromURL:@"lol"];
    return result;
}

But it's not recognizing downloadImageFromURL (a method from my NSImageView subclass). Xcode gives me an error.
Any thoughts?

Pedro Vieira
  • 3,330
  • 3
  • 41
  • 76

1 Answers1

0
  1. Either your subclass isn't really overriding -init:, or you aren't properly loading your subclass..
  2. Be sure there's no typo in the method name on the subclass: if you have, for instance, -init: in the subclass, the superclass's -init: will still be called.
  3. Are you overriding -allocWithZone: or something somehow?
Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
  • 1
    i figured it out! i have to create my NSTableCellView subclass and create an `IBOutlet` of my PVAsyncImageView and it's working now. thanks anyway! – Pedro Vieira Nov 09 '12 at 16:02
  • but it's stupid. if i change the subclass of the nsimageview that comes with the 'Image & Text Table Cell View' it should do the job... – Pedro Vieira Nov 09 '12 at 16:13