Re: Navigating property lists using paths?
Re: Navigating property lists using paths?
- Subject: Re: Navigating property lists using paths?
- From: Daryn <email@hidden>
- Date: Sun, 22 Jun 2003 10:00:21 -0500
You could implement the key/value coding protocol as a category on the
property list objects, then use paths with a "." separator.
On Sunday, June 22, 2003, at 01:49 AM, Scott Andrew wrote:
I have a question. I have to navigate deep into a property list (about
9 - 10 levels). Can do this with a path string? Similar to
"\foo\bar\i\am".. What class would I want to do this with? Right now i
am create a dictionary for each level.
That brings one more question.. If i the following two lines (id don't
but would like to)
-(void) workWithPropertiesFile(NSString path)
{
NSDictionary* root = [NSDictionary dictionaryWithContentsOfFile: path];
NSDictionary* item = [root objectForKey:@"foo"];
.. do some work with foo;
item = [rooot objectForKey:@"bar"];
}
Does the item dictionary get cleaned up properly?
Scott Andrew
_______________________________________________
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.
Daryn
_______________________________________________
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.