Re: Settings via plist
Re: Settings via plist
- Subject: Re: Settings via plist
- From: Howard Griffith <email@hidden>
- Date: Wed, 26 Feb 2003 08:34:22 -0800 (PST)
Alvaro,
I store the preferences for my project in a
NSDictionary which I write to the plist file with this
line:
[newDefaults
writeToFile:[@"~/Library/Preferences/com.howard.plist"
stringByExpandingTildeInPath] atomically:YES];
When it comes time to read it I use:
oldAppDefaults = [[NSDictionary
dictionaryWithContentsOfFile:[@"~/Library/Preferences/com.howard.plist"
stringByExpandingTildeInPath]] retain];
Which can be checked to see if it is empty before
actually using the settings by using:
if ([oldAppDefaults count] == 0)
Hope this helps a little.
--- Alvaro Muir <email@hidden> wrote:
>
Hello all,
>
Short newbie question. Could anyone point me in
>
the right direction in
>
implementing a plist for some of my variables? I am
>
trying to build a small
>
cocoa app using the cocoa-mysql framework, and I
>
would like to keep all of
>
the connection info in a plist, as opposed to hard
>
coded in, or
>
user-prompted. Could anyone help?
>
>
>
--
>
>
Alvaro Muir
>
Columbia University LRC
>
>
Im : alvaromuir
>
email@hidden
>
email@hidden
>
_______________________________________________
>
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.
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
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.