On 26/06/2009, at 2:19 AM, Richard Gutierrez wrote:
NSArray* path = [NSArray arrayWithObject:url];
if (path) {
[NSThread
detachNewThreadSelector:@selector(addImagesWithPaths:) toTarget:self
withObject:path];
}
[imageBrowser setSelectionIndexes:[NSIndexSet indexSetWithIndex:
0] byExtendingSelection:NO];
My guess is that there's nothing to select, because you are loading
images in a second thread, and at the time setSelectionIndexes is
called, the thread hasn't managed to load even the first image yet.
You'll need to arrange for the thread to tell the main thread when it
has done some work so that the first thread can perform the selection.
--Graham
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com