Re: Global Variables
Re: Global Variables
- Subject: Re: Global Variables
- From: Johnny Deadman <email@hidden>
- Date: Tue, 22 Mar 2005 00:06:59 -0500
I would say the best thing is to ask yourself why you want to do
this. Very few properties need to be accessible by every single class.
For properties that really do need to be available everywhere, like
the units your user prefers to use, then make it a user default if
appropriate:
http://developer.apple.com/documentation/Cocoa/Conceptual/
UserDefaults/index.html#//apple_ref/doc/uid/10000059i
Alternatively, if it isn't something the user should be able to
change, you can declare it as 'extern' as Rakka describes, which is
what Apple do for their constant strings and so on.
On 21-Mar-05, at 11:35 PM, Adam wrote:
What is the best way to make a variable globally accessible across
all of my obj-c classes?
_______________________________________________
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