Re: Global Variables
Re: Global Variables
- Subject: Re: Global Variables
- From: BlueHorseshoe <email@hidden>
- Date: Tue, 22 Mar 2005 00:31:31 -0500
On Mar 22, 2005, at 12:19 AM, Adam wrote:
I know including it in every class is overkill, but I have variables
that 3 or 4 classes share and I am constantly changing them in
multiple places. Will an extern work with cocoa code like NSString?
Yes, NSString's or any other C struct can be declared "extern," but as
Mr. Deadman suggests you are embarking on a bad design.
I would suggest that you assign one class some kind of ownership role
for these shared variables and then use normal methods for the other
classes to access it.
_______________________________________________
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