Hello... I have an IKImageBrowserView that is not refreshing it's data correctly. I have an NSPopUpButton which has a list of directories in its array, when a directory is selected, it changes the contents of my IKImageBrowserView to display all image files contained in the said directory.
Unfortunately, I have encountered an issue with the IKImageBrowserView's "reloadData" call. When I have no objects selected in the IKImageBrowserView, the reloadData call works as expected. The problem is, I have set IKImageBrowserView's "setAllowsEmptySelection" to "NO" and (thanks to you all's help) set the IKImageBrowserView to "setSelectionIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];", so there is always a selection. When my IKImageBrowserView has an object selected, the "reloadData" call gives me the following error: "2009-07-01 14:28:43.453 ImageBrowser[17020:813] *** -[NSCFArray objectAtIndex:]: index (2147483647( or possibly larger)) beyond bounds (0)" and I have been unable to resolve this issue. Here is my call when the NSPopUpButton's selection is changed which causes the problem at "[imageBrowser reloadData]" on both the "if" and "else" statements: - (IBAction) pubSelectionChanged:(id)sender { NSString *selectedPUBItem = [[selectCategoryPUB selectedItem]title]; NSString *selectedCategoryPath = [NSString stringWithFormat:@"/Users/richardg/Desktop/Demetras_Images/Thank You_Referral Cards/%@", selectedPUBItem]; NSArray *categoryPath = [NSArray arrayWithObject:selectedCategoryPath]; if ([selectedPUBItem isEqualToString:@"All Images"]) { NSString *allImagesPUBSelection = @"/Users/richardg/Desktop/Demetras_Images/Thank You_Referral Cards/"; NSArray *allImagesPath = [NSArray arrayWithObject:allImagesPUBSelection]; [images removeAllObjects]; [importedImages removeAllObjects]; [imageBrowser reloadData]; [NSThread detachNewThreadSelector:@selector(addImagesWithPaths:) toTarget:self withObject:allImagesPath]; } else { [images removeAllObjects]; [importedImages removeAllObjects]; [imageBrowser reloadData]; [NSThread detachNewThreadSelector:@selector(addImagesWithPaths:) toTarget:self withObject:categoryPath]; } } Any help here would be greatly appreciated. I looked extensively online and came up with many dead ends. Thank you AGAIN in advance! You guys are always a HUGE help! _______________________________________________ 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