On Jul 27, 2007, at 9:36 AM, Fred Kiefer wrote:
Stefan Bidigaray wrote:
4) Lastly, I'll need a lot of help creating ScreenSaverDefaults, but
only later. I've check NSUserDefaults' code and I'm more confused
now
than I was when I started out. I figured for this, the best thing
would
be to create a new file (ScreenSaverDefaults) under the Defaults
directory. NSUserDefaults, however, seems to be very picky about
there
being a process running and writing to that process.
You should just not worry about your settings being in a separate file
or not. GNUstep currently stores all defaults in one file, which btw I
do not like. All you need to do is to get and set your values from/in
[NSUserDefaults standardUserDefaults] and things should work as
expected.
I think the concern here was sharing defaults between a preferences
application and the actual screen save tool (which might need to be
some kind of daemon, or at least might need to be a daemon that
handles starting the screen saver). I don't really have a good answer
for how to do this. There could be several ways - writing your own
defaults file might be one of them.
Also, there's the issue of system-wide defaults vs user-defaults,
which NSUserDefaults doesn't handle currently (AFAIK), but that could
be useful for a screensaver.
_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev