Re: writeToFile:
Re: writeToFile:
- Subject: Re: writeToFile:
- From: Andreas Mayer <email@hidden>
- Date: Mon, 17 Feb 2003 23:03:16 +0100
Am Montag, 17.02.03 um 22:03 Uhr schrieb Hussain Bandukwala:
Is it even possible to write a dictionary to a .txt file? Am I missing
something? Any other suggestions for doing what I need to do?
Well, what about some debugging on your own?
// creating path
blockListDictPath = [[NSBundle mainBundle]
pathForResource:@"BlockedDevicesList" ofType:@"txt"];
Check, if this method returns a valid path.
// creating dictionary
blockedDirectory = [NSDictionary dictionaryWithObject: connectToDevice
forKey: deviceName];
Check if the dictionary is valid.
// calling writeToFile
if ([blockedDirectory writeToFile:blockListDictPath atomically:YES])
{NSLog(@"Success Writing to File");}
else
{NSLog(@"Failure Writing to File");}
Try to write something else (for example with NSString writeToFile) to
that destination.
As far as I know there is no restriction to the file types you can
write with NSDictionary's writeToFile:atomically:.
bye. Andreas.
_______________________________________________
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: | |
| >writeToFile: (From: "Hussain Bandukwala" <email@hidden>) |