• 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
CamelBones question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CamelBones question


  • Subject: CamelBones question
  • From: Pierre Vaudrey <email@hidden>
  • Date: Mon, 10 May 2004 22:11:41 +0200

As an exercise I'm translating the AddressBook application
http://www.macdevcenter.com/pub/a/mac/2001/08/24/cocoa.html from ObjC
to Perl using CamelBones.
I need help to translate in Perl initWithContentsOfFile and writeToFile
in this part of code ( the rest of code is OK ) :
- (void)awakeFromNib
{
// We'll implement the backup file scheme that was discussed in the
end of the column.
recordsFile = [NSString
stringWithString:@"~/Library/Preferences/AddressBookData.plist"];
recordsFile = [[recordsFile stringByExpandingTildeInPath] retain];
records = [[NSMutableArray alloc]
initWithContentsOfFile:recordsFile];
if ( nil == records ) {
records = [[NSMutableArray alloc] init];
}
}

- (void)saveData
{
[records writeToFile:recordsFile atomically:YES];
}

Pierre
_______________________________________________
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.


  • Follow-Ups:
    • Re: CamelBones question
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Default key problem
  • Next by Date: glitch in my size code?
  • Previous by thread: Default key problem
  • Next by thread: Re: CamelBones question
  • Index(es):
    • Date
    • Thread