• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Binding Tree Controller to a singleton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Binding Tree Controller to a singleton
      • From: Florent Pillet <email@hidden>
  • Prev by Date: Re: Sorting arrays with strings
  • Next by Date: Re: newb problem- Currency Converter app problem- Can't Add ConverterController Class to Nib
  • Previous by thread: Re: usleep()
  • Next by thread: Re: Binding Tree Controller to a singleton
  • Index(es):
    • Date
    • Thread