• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Write to file.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Write to file.
      • From: Macarov Anatoli <email@hidden>
    • Re: Write to file.
      • From: Filip van der Meeren <email@hidden>
  • Prev by Date: Re: Now contents of the layer not being rotated [was Re: Rotating a CALayer more than once is not working ]
  • Next by Date: Feasibility : setObjectValue: + bindings + Table Column with NSImageCell ??
  • Previous by thread: Toolbar View Item Size
  • Next by thread: Re: Write to file.
  • Index(es):
    • Date
    • Thread