Skip navigation.
 
mlBinding Tree Controller to a singleton
FROM : Michael Hanna
DATE : Sat Mar 15 17:57:14 2008

I have a MyDataModelManager that is a singleton instance. to get the
pointer to it you do:


    MyDataModelManager* mgr = [MyDataModelManager getInstance];


To access the data model for the tree controller you call:


    MyTreeDataModel* treeModel = [mgr treeDataModel];


Currently treeModel contains data structures that are content for the
tree controller.

My question is, how do I make a keypath from the tree controller to
the treeModel, since it's sitting inside a singleton? Would
programmatically setting the binding accomplish this?

Also, would it be necessary for  MyTreeDataModel be an
NSArrayController subclass?

Michael

Related mailsAuthorDate
mlBinding Tree Controller to a singleton Michael Hanna Mar 15, 17:57
mlRe: Binding Tree Controller to a singleton Florent Pillet Mar 16, 22:36