Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Adding items dynamically behaving funny #12

@coneybeare

Description

@coneybeare

I am adding items to the source list dynamically using the following code:

    - (void)addPlaylist:(NSNotification *)notification {
        // Create a core data
        UABaseNode *node = [[UAModelController defaultModelController] createPlaylistBaseNode];
        [sourceList expandItem:[node parent]];
        [sourceList reloadData];
        [sourceList noteNumberOfRowsChanged];
        NSInteger row = [sourceList rowForItem:node];
        [sourceList scrollRowToVisible:row];
        [sourceList selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
        [sourceList editColumn:0 row:row withEvent:nil select:YES];
    }

and although items are added, the focus is not applied correctly and the following weird behavior happens: http://screencast.com/t/ZV4Nd3vWD

Notice how I am typing in a cell but directly on top of the previous value. Clicking away and editing the cell by pressing enter works fine. It is only when trying to add an element dynamically, then set it to editing mode programmatically that this happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions