FYI: IKImageBrowserView bug

  • Just a heads-up in case anyone else is wondering about this: There
    seems to be a bug in IKImageBrowserView -- namely, at least these two
    methods are missing:

    --

    - (void)collapseGroupAtIndex:(NSUInteger)index {
    [self collapseGroup:[[[self layoutManager] groups]
    objectAtIndex:index]];
    }

    - (void)expandGroupAtIndex:(NSUInteger)index {
    [self expandGroup:[[[self layoutManager] groups] objectAtIndex:index]];
    }

    --

    Mind you: They _are_ in the header files, but apparently, they are
    just not implemented. I managed to simulate them after learning about
    the inner workings of IKImageBrowserView via class-dump.

    Cheers,

    Peter.

    --
    manytricks.com
  • Actually, even API is not thought-through at the moment.  For instance,

      (BOOL) imageBrowser:(IKImageBrowserView *) aBrowser
    moveItemsAtIndexes: (NSIndexSet *)indexes toIndex:
    (NSUInteger)destinationIndex;

    of IKImageBrowserDataSource only specifies destination index.  This
    API breaks at the group boundary: destination index at the end of one
    group is just the same as beginning of another, and you have no way of
    knowing which one it actually was.

    In fact, call me old-fashion, but I hate IKImageBrowserDataSource
    design altogether.  As far as API goes, I would ask from data source
    group list, and for each group - item list.  Internally, they could
    construct global item array, etc, but to expose well-performing
    structures as provider API is simply bad taste in my opinion (and very
    70-ies too ;)).

    Hope they'll fix it one day...
    -Evgeni

    On Feb 15, 2008, at 7:48 PM, Peter Maurer wrote:

    > Just a heads-up in case anyone else is wondering about this: There
    > seems to be a bug in IKImageBrowserView -- namely, at least these
    > two methods are missing:
    >
    > --
    >
    > - (void)collapseGroupAtIndex:(NSUInteger)index {
    > [self collapseGroup:[[[self layoutManager] groups]
    > objectAtIndex:index]];
    > }
    >
    > - (void)expandGroupAtIndex:(NSUInteger)index {
    > [self expandGroup:[[[self layoutManager] groups]
    > objectAtIndex:index]];
    > }
    >
    > --
    >
    > Mind you: They _are_ in the header files, but apparently, they are
    > just not implemented. I managed to simulate them after learning
    > about the inner workings of IKImageBrowserView via class-dump.
    >
    > Cheers,
    >
    > Peter.
    >
    > --
    > manytricks.com
previous month february 2008 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    
Go to today