Binding Tree Controller to a singleton
Binding Tree Controller to a singleton
- Subject: Binding Tree Controller to a singleton
- From: "Michael Hanna" <email@hidden>
- Date: Sat, 15 Mar 2008 09:57:14 -0700
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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden