Re: Settings via plist
Re: Settings via plist
- Subject: Re: Settings via plist
- From: David Remahl <email@hidden>
- Date: Tue, 25 Feb 2003 03:03:06 +0100
It's as simple as this (if the settings are stored in a dictionary
plist file in the resources folder of the application package, and it
contains a key, "Host"):
NSString *plistPath = [[NSBundle mainBundle]
pathForResource:@"Settings" ofType:@"plist"];
NSDictionary *settings = [NSDictionary
dictionaryWithContentsOfFile:plistPath];
NSString *sqlHost = [settings objectForKey:@"Host"];
/ Rgds, David
On Monday, February 24, 2003, at 08:41 PM, Alvaro Muir 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?
_______________________________________________
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.