• 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
IKImageBrowserView setSelectionIndex not selecting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IKImageBrowserView setSelectionIndex not selecting


  • Subject: IKImageBrowserView setSelectionIndex not selecting
  • From: Richard Gutierrez <email@hidden>
  • Date: Mon, 22 Jun 2009 17:08:35 -0700
  • Acceptlanguage: en-US
  • Thread-topic: IKImageBrowserView setSelectionIndex not selecting

I have been researching extensively on how to set an IKImageBrowserView's initial selection upon load to 0 index. Here is the call I am making:

[imageBrowser setSelectionIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];

 Seems like the IKImageBrowserView is not fully loaded when the call is made, however, I do have an IKImageView which is selecting and loading the first object in the ImageBrowserView's object list correctly mat the same time I am calling the same time. Here is the entire call:

- (void)updateDatasource {
    [images addObjectsFromArray:importedImages];
    [importedImages removeAllObjects];
    [imageBrowser reloadData];
    NSString *firstImagePath = [[images objectAtIndex:0] imageUID];
    NSURL *firstImageURL = [NSURL fileURLWithPath:firstImagePath];
    [previewImageStatic setImageWithURL:firstImageURL];
    [pathTextField setStringValue:firstImagePath];
    [imageBrowser setSelectionIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
}

I am not sure how I can get this call to select the object at index 0. I even created an IBAction connected to a test button using the following code:

- (IBAction)selectImageBrowserFirstObject:(id)sender {
    [imageBrowser setSelectionIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
}

And that works perfectly (since the IKImageBrowserView is already completely loaded. Any ideas on how to work this out? Thank you in advance.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: IKImageBrowserView setSelectionIndex not selecting
      • From: Graham Cox <email@hidden>
  • Prev by Date: Beginner Question Re: Memory Management
  • Next by Date: Re: Beginner Question Re: Memory Management
  • Previous by thread: Re: Beginner Question Re: Memory Management
  • Next by thread: Re: IKImageBrowserView setSelectionIndex not selecting
  • Index(es):
    • Date
    • Thread