• 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
Re: Binding to a Singleton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding to a Singleton


  • Subject: Re: Binding to a Singleton
  • From: Mike Abdullah <email@hidden>
  • Date: Tue, 26 Sep 2006 17:02:50 +0100

Because it's a singleton. I want to bind to it from my document NIB, and by instantiating the class in the NIB will result in multiple instances of my class. There will be one instance for every document - not something I want!

Mike.

On 26 Sep 2006, at 16:26, Andrei Tchijov wrote:

Why don't you create an instance of your class in the NIB and than bind standard NSObjectController to it?

On Sep 26, 2006, at 5:05 AM, Mike Abdullah wrote:

In my app I have a singleton class that behaves kinda like NSUserDefaults. So I'm wondering, what's my best bet for how to go about binding to this class from a document NIB.

Options I can see:

* Bind to NSApp and use my AppDelegate to hook the singleton up correctly
* Bind to an NSObjectController and in code connect this object controller to the singleton at runtime
* Create a subclass of NSObjectController that always connects itself to my singleton
* Manually bind everything in code at runtime


Mike.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Binding to a Singleton
      • From: Shaun Wexler <email@hidden>
    • Re: Binding to a Singleton
      • From: Shaun Wexler <email@hidden>
References: 
 >Binding to a Singleton (From: Mike Abdullah <email@hidden>)
 >Re: Binding to a Singleton (From: Andrei Tchijov <email@hidden>)

  • Prev by Date: Re: Notification when changes occur to an array?
  • Next by Date: Re: Accuracy of timestamping streamed data
  • Previous by thread: Re: Binding to a Singleton
  • Next by thread: Re: Binding to a Singleton
  • Index(es):
    • Date
    • Thread