Re: global NSMutableDictionary
Re: global NSMutableDictionary
- Subject: Re: global NSMutableDictionary
- From: Devon Ferns <email@hidden>
- Date: Tue, 29 Jul 2008 14:05:47 -0400
I think you probably want to use the singleton design pattern rather
than that global variable.
Devon.
Nathaniel Gottlieb-Graham wrote:
I am trying to implement a global variable that's an
NSMutableDictionary. Up until now I've achieved this by making
globalVariables.h and .m files to hold globals that are imported by all
my classes. globalVariables defines externs, and I already have two
extern NSStrings set up and working. But as soon as I try to create an
extern variable here that's *not* and NSString, the compiler errors with
"Initializer element is not constant". What does this mean?
Why do externs seem to have to be NSStrings? Also, is this even the
right way to go about having a read/write global NSMutableDictionary?
If not, how would I do this?
Thanks!
_______________________________________________
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
_______________________________________________
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