Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > Mac OS X Development Forums > Objective-C, Python, Ruby Development

Reply
 
LinkBack Thread Tools Display Modes
Old 12-25-2009, 04:32 PM   #1 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 1
koitohay is on a distinguished road
Default Property list

Hi All,

I am completely newbee in objective c. I am trying to create property lists by reading a xml file using xml parser. works fine untill here.

But when i try to create a propertylist from this array that is holding the values i get the property list with empty data.
here is the code

Code:
- (void)viewDidLoad {
    [super viewDidLoad];
    // Uncomment the following line to add the Edit button to the navigation bar.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
	
	appDelegate = (XMLAppDelegate *)[[UIApplication sharedApplication] delegate];
	kal = [[NSMutableDictionary alloc] init];
	
	int  count = [appDelegate.books count];
	Book *aBook;
	
	for(int i = 0; i<count; i++)
	{	
	
	aBook = [appDelegate.books objectAtIndex:i];
		kal2 = [NSDictionary dictionaryWithObjectsAndKeys:aBook.letters,@"letter",
				aBook.word,@"word",
				aBook.origin,@"origin",
				aBook.grammatical,@"grammatical",
				aBook.meaning,@"meaning",nil];
		[kal setObject:kal2 forKey:aBook.word];
		NSLog(aBook.word);
		NSLog(aBook.meaning);
		[kal2 release];
		[kal retain];
		
	}
	if([kal writeToFile:@"/Users/sk/Documents/urdudictionary" atomically:false])
	{
		NSLog(@"Success");
	}
	else
	{
		NSLog(@"Failure");
	}
koitohay is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 466
16 members and 450 guests
7twenty7, AlanFloyd, David-T, iAppDeveloper, imac74, Jaxen66, logan, lovoyl, markuschow, Music Man, mutantskin, Sami Gh, SLIC, solardrift, unicornleo, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,683
Threads: 94,131
Posts: 402,932
Top Poster: BrianSlick (7,990)
Welcome to our newest member, unicornleo
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:08 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0