Heterogeneous NSTreeController
        Posted  
        
            by andyvn22
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by andyvn22
        
        
        
        Published on 2010-04-02T16:34:09Z
        Indexed on 
            2010/04/02
            23:43 UTC
        
        
        Read the original article
        Hit count: 505
        
I have an NSTreeController (supplying content to an NSOutlineView). I'd like the top-level objects to be of one class, and all other objects (so, children at any level) to be of another. What's the best way to go about this?
I'll need to somehow change the behavior of at least add, addChild, insert, and insertChild, I suppose. I was hoping, though, to find a simple way to account for this in only one location, rather than changing four separate methods.
© Stack Overflow or respective owner