home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / programm / 6008 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  1.6 KB

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