Storing structured data in file - any easy way?

2008-07-10 Thread Jules Colding
Hi, I'm trying to figure out how to write and read structured data to a specific file. I have a very bad feeling that the answer is Core Data, but I'm feeling totally at lost after having been reading up on Core Data for a couple of days by now. This is what I would like to do: 1) I want

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Jules Colding
Thanks a lot. I'll take a look. Best regards, jules On 10 Jul 2008, at 11:09 pm, Jules Colding wrote: Hi, I'm trying to figure out how to write and read structured data to a specific file. I have a very bad feeling that the answer is Core Data, but I'm feeling totally at lo

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Jules Colding
abase or should I manually seek through a file? Thanks, jules hth, Graham On 10 Jul 2008, at 11:09 pm, Jules Colding wrote: Hi, I'm trying to figure out how to write and read structured data to a specific file. I have a very bad feeling that the answer is Core Data, but I&

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Jules Colding
Hi again, On 10/07/2008, at 20.29, Jules Colding wrote: On 10/07/2008, at 15.18, Graham Cox wrote: Sounds like you want to do archiving - it can handle all the object relationships you mention. Check out NSKeyedArchiver and the NSCoding protocol. http://developer.apple.com/documentation

Re: Storing structured data in file - any easy way?

2008-07-11 Thread Jules Colding
On 11/07/2008, at 01.28, Chris Hanson wrote: On Jul 10, 2008, at 6:09 AM, Jules Colding wrote: I'm trying to figure out how to write and read structured data to a specific file. I have a very bad feeling that the answer is Core Data, but I'm feeling totally at lost after h

Re: Storing structured data in file - any easy way?

2008-07-11 Thread Jules Colding
Hi Jens, On 10/07/2008, at 22.50, Jens Alfke wrote: On 10 Jul '08, at 11:29 AM, Jules Colding wrote: Assume that I want to store the set {"HI", "HELLO"}. At one point I want to be able to use "HI" as key and get "HELLO". At another point I wan

Re: Storing structured data in file - any easy way?

2008-07-12 Thread Jules Colding
Hi, On 12/07/2008, at 02.22, Ben Trumbull wrote: At 12:39 AM -0700 7/11/08, [EMAIL PROTECTED] wrote: > Out of curiosity, what do you find not simple about doing the above using Core Data? It is easy enough to create the data model using xcode, but how that connects to actual code is harder

How do I register a cocoa bundle identifier?

2008-08-20 Thread Jules Colding
Hi, I have this cocoa bundle which contains an executable (a shell tool) in the "Contents/MacOS" directory. I would like to register to bundle so that I can execute the contained program with "open -b com. 42tools.julia.backend" from the terminal. I've tried using LSRegisterFSRef() with va

Re: !foo vs foo == nil

2008-08-21 Thread Jules Colding
On 21/08/2008, at 01.56, John C. Randolph wrote: On Aug 20, 2008, at 4:15 PM, Torsten Curdt wrote: There was a common perception that NULL is not really the same as nil. But seems like in the end it really is (void*)0. They differ in type, not in value. "NULL" is (void *) 0. "nil" is (

Re: !foo vs foo == nil

2008-08-21 Thread Jules Colding
On 21/08/2008, at 09.21, Thomas Davie wrote: On 21 Aug 2008, at 09:06, Jules Colding wrote: On 21/08/2008, at 01.56, John C. Randolph wrote: On Aug 20, 2008, at 4:15 PM, Torsten Curdt wrote: There was a common perception that NULL is not really the same as nil. But seems like in the

Re: !foo vs foo == nil

2008-08-22 Thread Jules Colding
On 22/08/2008, at 00.38, Andy Lee wrote: On Aug 21, 2008, at 3:42 PM, Jim Correia wrote: On Aug 21, 2008, at 3:54 AM, Jules Colding wrote: For that simple reason, I'd go for nil == foo every time. Yes, and in general you should always do "if (CONSTANT == foo)" to catch th

Re: NSDate autorelease problem

2008-09-03 Thread Jules Colding
On 03/09/2008, at 19.02, [EMAIL PROTECTED] wrote: Hi, I'm trying to calculate the elapsed time by calling this twice and getting the difference. double Seconds() { return [[NSDate date] timeIntervalSince1970]; } There is no need to use cocoa for everything. Use gettimeofday() instead

Start traces with CrashReporter

2009-01-23 Thread Jules Colding
Hi, Is there any way to make CrashReporter show stack frame content and line numbers instead of signatures and offsets? Maybe a way to make gdb automatically attach to crashing processes and do a "t a a bt f" on them? Thanks, jules ___ Cocoa

Re: Start traces with CrashReporter

2009-01-23 Thread Jules Colding
On 23/01/2009, at 20.33, Jean-Daniel Dupas wrote: OK, this does not contains as much info as you want. depending your need, you may activate core dump generation. So you will be able to launch gdb on the dump to retreive the info you need. http://developer.apple.com/technotes/tn2004/tn2124