Re: Shared Instance of a class
Re: Shared Instance of a class
- Subject: Re: Shared Instance of a class
- From: Paolo Bertani <email@hidden>
- Date: Sat, 20 May 2006 21:55:05 +0200
Has'n every subclass of NSObject a class method to obtain a reference
to every instance of that class?
I have a custom class that I instanciate in my MainMenu nib. What
I want to do is be able to issue the command:
[MyClass sharedInstance]
and get that particular instance of the class. I know how to do
this with a class that is only instanciated once the sharedInstance
message is received, but the object pre-exists.
NSDocumentController is capable of this. Any ideas?
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