Re: Should I use NSDocument, NSUserDefaults or something else

2010-09-30 Thread Quincey Morris
On Sep 30, 2010, at 04:42, Jonny Taylor wrote: > This made me think that an NSDocument might be a more appropriate solution > (different document for each experiment, storing a hierarchical dictionary of > key/value pairs but implementing my own handling of defaults for missing > keys, etc). Ho

Re: Should I use NSDocument, NSUserDefaults or something else

2010-09-30 Thread Mark Munz
I think you can use NSUserDefaults just fine. For the exposure example, you might do something like register a default value for "exposure" category. First check for the camera specific key ("QI1438.exposure"), if result is nil, grab the general category value. You could wrap that in a single me

RE: Should I use NSDocument, NSUserDefaults or something else

2010-09-30 Thread Shawn Bakhtiar
reter for those specific values. Hope this gives you some ideas, > From: j.m.tay...@durham.ac.uk > Date: Thu, 30 Sep 2010 12:42:04 +0100 > To: cocoa-dev@lists.apple.com > Subject: Should I use NSDocument, NSUserDefaults or something else > > Thankyou for peoples patience with my r

Re: Should I use NSDocument, NSUserDefaults or something else

2010-09-30 Thread Angus Hardie
On 30 Sep 2010, at 12:42, Jonny Taylor wrote: > My app is a workstation for a type of microscope, which from the point of > view of the software consists of several different video cameras and some > other devices controlled over USB. Each camera has associated settings (e.g. > exposure) that

Should I use NSDocument, NSUserDefaults or something else

2010-09-30 Thread Jonny Taylor
Thankyou for peoples patience with my recent very basic conceptual cocoa questions. I have another where I am trying to understand the best way of handling some persistent data storage. My app is a workstation for a type of microscope, which from the point of view of the software consists of se