home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!umd5!oberon.umd.edu!matthews
- From: matthews@oberon.umd.edu (Mike Matthews)
- Newsgroups: comp.sys.next.programmer
- Subject: Defaults Database management
- Message-ID: <15314@umd5.umd.edu>
- Date: 5 Sep 92 16:51:45 GMT
- Sender: news@umd5.umd.edu
- Lines: 31
- Originator: matthews@oberon.umd.edu
-
- I've looked through the Next Developer files in Librarian and have read the
- section on defaults, but I must be extremely dense because I still can't
- figure this one out.
-
- How can I flush the registration table of defaults to the .NeXTdefaults
- database? NXWriteDefaultsVector() takes what's in your vector and dumps it
- to the database and puts the new values into the registration table.
-
- I tried changing the vector information (a la strcpy) but that gave an
- "invalid operands to binary +" error on compile so there's something going on
- behind the scenes that I don't grok too well.
-
- All the update & write calls seem to go from database to registration table.
- I want to go the other way! I've NXSetDefault'd just fine;
- NXGetDefaultValue calls show the new value.
-
- I don't want to call NXWriteDefault because I want to have a 'revert to
- saved' button (i.e. I don't want to commit changes until the user says so).
-
- It's gotta be simple.
-
- Doesn't it?
-
- Any help greatly appreciated. [for the curious, I'm putting a Preferences
- panel in Missile Command since the #define's were a bit unplayable for my
- tastes... all that's not working - far as I can tell - is saving the damn
- defaults!!!]
- ------
- Mike Matthews, matthews@oberon.umd.edu (NeXTmail accepted)
- ------
- The earth is like a tiny grain of sand, only much, much heavier.
-