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

Re: IKImageBrowserView setSelectionIndex not selecting


  • Subject: Re: IKImageBrowserView setSelectionIndex not selecting
  • From: Ramakrishna Vavilala <email@hidden>
  • Date: Thu, 25 Jun 2009 13:53:39 -0400

You need to call [imageBrowser reloadData]. When you call
setSelectionIndexes there need to be items in the list calling
reloadData will ensure that there are items.

On Thu, Jun 25, 2009 at 12:19 PM, Richard
Gutierrez<email@hidden> wrote:
> I did place this in the awakeFromNib... I also tried placing it in "updateDatasource",  "addImagesWithPath", and "addImagesWithPaths". All of the calls do not work. Here is my awakeFromNib code:
>
> - (void)awakeFromNib {
>    images = [[NSMutableArray alloc] init];
>    importedImages = [[NSMutableArray alloc] init];
>
>    [imageBrowser setAllowsReordering:YES];
>    [imageBrowser setAnimates:YES];
>    [imageBrowser setDraggingDestinationDelegate:self];
>    [imageBrowser setCellsStyleMask:IKCellsStyleOutlined | IKCellsStyleShadowed | IKCellsStyleTitled];
>    [imageBrowser setAllowsMultipleSelection:NO];
>    [imageBrowser setAllowsEmptySelection:NO];
>    [self populatePUB:nil];
>
>    NSDictionary *dict = [[NSBundle mainBundle] infoDictionary];
>    NSString *url = [dict objectForKey:@"MPStockImagesURL"];
>    NSArray* path = [NSArray arrayWithObject:url];
>    if (path) {
>        [NSThread detachNewThreadSelector:@selector(addImagesWithPaths:) toTarget:self withObject:path];
>    }
>    [imageBrowser setSelectionIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
> }
>
> Any ideas??
>
> On 6/22/09 7:51 PM, "Graham Cox" <email@hidden> wrote:
>
>
>
> On 23/06/2009, at 10:08 AM, Richard Gutierrez wrote:
>
>> 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
>
>
> Where do you call this from?
>
> You'll need to call it from -awakeFromNib to ensure the view is loaded.
>
> --Graham
>
>
>
>
> _______________________________________________
>
> 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
>
_______________________________________________

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

References: 
 >Re: IKImageBrowserView setSelectionIndex not selecting (From: Graham Cox <email@hidden>)
 >Re: IKImageBrowserView setSelectionIndex not selecting (From: Richard Gutierrez <email@hidden>)

  • Prev by Date: Re: Which drawing tool for a simple task
  • Next by Date: Re: IBPlugin embedding question
  • Previous by thread: Re: IKImageBrowserView setSelectionIndex not selecting
  • Next by thread: Re: IKImageBrowserView setSelectionIndex not selecting
  • Index(es):
    • Date
    • Thread