• 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
Strange behavior of "NSUserDefaults"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange behavior of "NSUserDefaults"


  • Subject: Strange behavior of "NSUserDefaults"
  • From: Frank Blome <email@hidden>
  • Date: Tue, 20 Aug 2002 22:48:17 +0200

Hello,

I am totally confused. I use the functions for the standardUserDefaults 1000 times without problems. But now, in one project the function:

- (IBAction) setVersionLookUp:(id)sender
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setBool:[sender state] forKey:@"CheckVersion"];
}

tells me: "syntax error, found `forKey' " while compiling but I can start the app after it.

If have even tried the code above in one line:

[[NSUserDefaults standardUserDefaults] setBool:[sender state] forKey:@"CheckVersion"];

but the result is the same. It is basic work, but I can't fix this damn syntax error...

Can just anybody tell me whats my fault?

Thank you,
Frank
_______________________________________________
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.

  • Follow-Ups:
    • Re: Strange behavior of "NSUserDefaults"
      • From: Itrat Khan <email@hidden>
  • Prev by Date: Re: Creating a Mach-O library?
  • Next by Date: How to make an NSColor correspond to a grayscale value?
  • Previous by thread: Re: Re(2): SystemIcons.bundle
  • Next by thread: Re: Strange behavior of "NSUserDefaults"
  • Index(es):
    • Date
    • Thread