Datos básicos NSTableView

I'm working on an OSX App where I open a directory and get a list of files from it and put it on a table. That works fine and they are bound to an array controller. Everything seems fine and dandy until I want to update a Table row. I add it to an array (not the array controller) and I do a [tableView reloadData]; and nothing happens!

This worked fine until I added CoreData to the situation.

When I get the files from the directory I do this:

 for (NSString *file in filelist){

    NSManagedObject *fileEntity = [NSEntityDescription insertNewObjectForEntityForName:@"File" inManagedObjectContext:[self managedObjectContext]];
    [fileEntity setValue:file forKey:@"filename"];

    NSImage *Image = [NSImage imageNamed:@"tag_white.png"];
    [fileEntity setValue:Image forKey:@"taggedImage"];


}

I just can't seem to update the information on the table through

-(id) tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row

ya no..

preguntado el 26 de agosto de 12 a las 23:08

Any reason why you don't add it to the array controller? If the array you are adding it to is not connected in any way to the tableview then of course nothing will happen. -

I'd like to but I don't know how actually. :-X -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.