Write to file.
Write to file.
- Subject: Write to file.
- From: Macarov Anatoli <email@hidden>
- Date: Mon, 15 Dec 2008 02:25:50 -0800 (PST)
I have got my own bundle that I insert into login window. When login window is started up the bundle writes necessary parametr into file which is situated in /Library/Preferences/. I try to write in the following way:
NSString *Value;
NSDictionary *theDict = [NSDictionary dictionaryWithObjectsAndKeys: Value, @"Type", nil];
if([theDict writeToFile:@"/Library/Preferences/myFile.plist" atomically:NO]){
NSString *sString = [NSString stringWithFormat:@"Saving the file Preferences"];
const char *err = [sString UTF8String];
syslog(0,err);
}else{
NSString *sString = [NSString stringWithFormat:@"There was a problem saving the file Preferences"];
const char *err = [sString UTF8String];
syslog(0,err);
}
Gives the message Error in Writing. This code works fine in application. What is another way to write into file?
________________________________________________________
Вы уже с Yahoo!?
Испытайте обновленную и улучшенную. Yahoo! Почту! http://ru.mail.yahoo.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden