• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTableView reloadData not working?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView reloadData not working?


  • Subject: NSTableView reloadData not working?
  • From: Michael Becker <email@hidden>
  • Date: Mon, 24 Nov 2003 22:41:59 +0100

Hi!

When drag&dropping several image files into my tableview, I create thumbnails of these images and display them. As resizing the images may take a while I want to keep the user informed that something is happening, so he doesn't think the app crashed or whatever.
I've implemented an NSProgressIndicator which works well, but I also wanted to have each thumbnail displayed as soon as the resizing is through.
In my - tableView:acceptDrop: ... method I have the following loop:

for(i=0; i<[fileArray count]; i++) {
NSString *path = [fileArray objectAtIndex:i];
[ listManager addImage:path];

NSLog(@"Pictures resized: %d, listManager count: %d", i, [ listManager listCount]);
[ pTableView reloadData];
}

listManager is a custom class that takes care of the images and stores them in its own arrays. The NSTableView delegate method -numberOfRowsInTableView: asks listManager for the current image count to know how many rows it should display. Everything works beautifully so far.

However, the table is only reloaded after ALL thumbnails are created, whereas the NSLog() command outputs its messages in nice intervals (supposedly everytime an image has been resized).

Why doesnt the TableView reload each time an image has been resized and added to my ListManager? (I also tried -setNeedsDisplay:YES ... same result)

Bye,
Michael
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSTableView reloadData not working?
      • From: Ambroise Confetti <email@hidden>
  • Prev by Date: Re: dealloc of App Contoller never gets called
  • Next by Date: Re: Launching a GUI app from a daemon?
  • Previous by thread: RE: Displaying color code in stead of colored text?
  • Next by thread: Re: NSTableView reloadData not working?
  • Index(es):
    • Date
    • Thread