Skip navigation.
 
mlRe: outlineViewSelectionDidChange not called
FROM : Jonathan Dann
DATE : Wed Mar 26 20:49:55 2008

<Repost, forgot to send to the list>

On 26 Mar 2008, at 03:24, Adam Gerson wrote:

> I take that back. [outlineView selectedRow] does appear to tell the
> absolute truth. So I should now be able to try what you said and tie
> the tree controller's @"selectionIndexPaths" to [outlineView
> selectedRow]. I will report back my results...
>
> Adam



Ah.. I'm not quite sure you got what I meant.  In a (document-based) 
app set up an NSArray *selectionIndexPaths ivar, so the 
NSTreeController then binds its @"selectionIndexPaths" binding to the 
keypath @"File's Owner.selectionIndexPaths" where file's owner (the 
document) is the owner of the nib containing the tree controller and 
the outline view.  The outline view then has its content bound to the 
tree controller's @"arrangedObjects" controller key, the 
selectionIndexPaths to the @"selectionIndexPaths" controller key and 
then the outline view's table column's @"value" binding is set to the 
tree controller's @"arrangedObjects.nodeName" (nodeName is just an 
NSString representation of a file path).

Doing what you said may not work.

>> On Tue, Mar 25, 2008 at 10:29 AM, Jonathan Dann 
>> <j.p.<email_removed>> wrote:

>>> Have your tried binding the tree controller's @"selectionIndexPaths"
>>> binding to a variable in your model object?
>>>
>>> I havent tried it but it seems that you can do this in IB and then 
>>> get
>>> the model to observe the bound instance variable and you cab then 
>>> see
>>> each time the variable changes. Not sure if it will cover all the
>>> bases you need though.
>>>
>>> You'd get an array if selection index paths and then just see if the
>>> count of the array is 1 for single selection or more if you have
>>> multiple.
>>>
>>> Jonathan Dann
>>>

Related mailsAuthorDate
mloutlineViewSelectionDidChange not called Adam Gerson Mar 25, 05:18
mlRe: outlineViewSelectionDidChange not called Jens Alfke Mar 25, 05:49
mlRe: outlineViewSelectionDidChange not called Adam Gerson Mar 25, 06:42
mlRe: outlineViewSelectionDidChange not called Jonathan Dann Mar 25, 15:29
mlRe: outlineViewSelectionDidChange not called Adam Gerson Mar 26, 04:12
mlRe: outlineViewSelectionDidChange not called Adam Gerson Mar 26, 04:24
mlRe: outlineViewSelectionDidChange not called Jonathan Dann Mar 26, 20:49
mlRe: outlineViewSelectionDidChange not called Adam Gerson Mar 27, 18:17
mlRe: outlineViewSelectionDidChange not called Hamish Allan Mar 27, 20:07
mlRe: outlineViewSelectionDidChange not called Adam Gerson Mar 30, 09:44
mlRe: outlineViewSelectionDidChange not called Jonathan Dann Mar 31, 22:38