IKImageBrowserView

  • I recently tried to play with the IKImageBrowserView. I wasn't able to set the 2  properties
    allowsEmptySelection and allowsMultipleSelection using IB3, both to no, but anyway i could do
    it directyly into the code. The problem was that i could find a way to select the first cell of my
    browserView directly after starting my application.

    I put this code into my awakeFromNib of my application Controller:

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

    But this seems to set a nil index to the browser view:
    "Browser selection changed to 2147483647".

    If put a button in my window and I implement the same code in my button method the first cell
    of my IKImageBrowserView will be selected.

    I should be something related to the awakeFromNib from the appliction Controller, and I
    probably try to select a cell who is not yet created.

    If someone could tell me a good way to solve this ???
  • IKImageBrowserView is pretty heavily threaded and asynchronous. I
    think it's possible that you're trying to make your selection before
    the IKImageBrowserView has actually loaded it's content. I'm not sure
    I have any good ideas on how to deal with this, maybe set the
    selection from your delegate when it vends the content for the view?

    On Oct 27, 2007, at 8:59 AM, Client netplus wrote:

    > I recently tried to play with the IKImageBrowserView. I wasn't able
    > to set the 2  properties
    > allowsEmptySelection and allowsMultipleSelection using IB3, both to
    > no, but anyway i could do
    > it directyly into the code. The problem was that i could find a way
    > to select the first cell of my
    > browserView directly after starting my application.
    >
    > I put this code into my awakeFromNib of my application Controller:
    >
    > [houseImageBrowser setSelectionIndexes:[NSIndexSet indexSetWithIndex:
    > 0]
    > byExtendingSelection:NO];
    >
    > But this seems to set a nil index to the browser view:
    > "Browser selection changed to 2147483647".
    >
    > If put a button in my window and I implement the same code in my
    > button method the first cell
    > of my IKImageBrowserView will be selected.
    >
    > I should be something related to the awakeFromNib from the
    > appliction Controller, and I
    > probably try to select a cell who is not yet created.
    >
    > If someone could tell me a good way to solve this ???
previous month october 2007 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Go to today