• 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: global NSMutableDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >global NSMutableDictionary (From: Nathaniel Gottlieb-Graham <email@hidden>)

  • Prev by Date: Re: Repositioning a content view w/in a window
  • Next by Date: Re: global NSMutableDictionary
  • Previous by thread: Re: global NSMutableDictionary
  • Next by thread: Re: global NSMutableDictionary
  • Index(es):
    • Date
    • Thread