• 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: Weird UserDefaults problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird UserDefaults problem


  • Subject: Re: Weird UserDefaults problem
  • From: mmalcolm crawford <email@hidden>
  • Date: Sun, 14 Mar 2004 19:00:31 -0800

On Mar 14, 2004, at 6:45 PM, Matt Ball wrote:

if(openNewWindowWithPageType == @"Empty Page")

== tests pointer identity, use [openNewWindowWithPageType isEqualToString:@"Empty Page"]

See:
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSString.html>

Also:
homePage = [[NSUserDefaults standardUserDefaults]
objectForKey:@"HomePageAddress"];
if(homePage == nil)
{
homePage = @"http://www.apple.com";;
}

It would probably be better to register @"http://www.apple.com"; as the "factory default" (see <http://developer.apple.com/documentation/Cocoa/Conceptual/ UserDefaults/index.html>, key word: "register")...

mmalc
_______________________________________________
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.


References: 
 >Weird UserDefaults problem (From: Matt Ball <email@hidden>)

  • Prev by Date: Re: Weird UserDefaults problem
  • Next by Date: Re: Weird UserDefaults problem
  • Previous by thread: Re: Weird UserDefaults problem
  • Next by thread: NSArrayController Howto use in simple non-document application?
  • Index(es):
    • Date
    • Thread