• 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
Question about NSUserDefaults
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about NSUserDefaults


  • Subject: Question about NSUserDefaults
  • From: Luca Torella <email@hidden>
  • Date: Mon, 10 Nov 2003 15:15:53 +0100

Hello,
I'm using the following method in an instance of a class
[[NSUserDefaults standardUserDefaults] setInteger:1 forKey:@"unit"];

Then I used this other method in another instance of a different class:

i = [[NSUserDefaults standardUserDefaults] integerForKey:@"unit"];

The problem is that the second method returns 0 and not 1.
I tried to use the two methods in the same class and the result is 1,
but putting the second method in a different file it returns 0. Why?
Don't
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: NSXMLParser question
  • Next by Date: NSOutlineView "expandAll" function.
  • Previous by thread: Re: NSXMLParser question
  • Next by thread: NSOutlineView "expandAll" function.
  • Index(es):
    • Date
    • Thread