...eving initial selection values
When CPArrayController is bound via selection key, initial selection values are not retrieved. Then it ends up with showing empty selection.
But after moving to another index, which calls setSelectionIndexes:(CPIndexSet)indexes, it becomes to work correctly.
setSelectionIndexes:(CPIndexSet)indexes calls _selectionDidChange(CPObjectController) that initiates selection proxy as follows:
if (_selection === undefined || _selection === nil)
_selection = [[CPControllerSelectionProxy alloc] initWithController:self];
So I suspect the instantiation of the proxy is the key, and changed that the proxy is instantiated in the constructor.
But how does the instantiation is deferred at all?
a suggested fix for CPArrayController selection binding failure in re…
…trieving initial selection values
Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.
@aljungberg or cacaodev should look at this, they are the binding experts.
Assignee: aljungberg. Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.
Assignee: aljungberg. Milestone: Someday. Labels: #needs-info, AppKit, bug. What's next? Additional information should be added as a comment to this isuse.
Merged, thank you!
CPObjectController was expecting its setContent to be called, which would eventually call _selectionDidChange, which would initialize _selection. However, CPArrayController overrides setContent and does not initialize _selection.
Assignee: aljungberg. Milestone: Someday. Labels: #fixed, AppKit, bug. What's next? This issue is considered successfully resolved.