home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3896 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  2.7 KB

  1. Path: sparky!uunet!olivea!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!linus!linus.mitre.org!virtual.mitre.org!user
  2. From: pathak@mitre.org (Heeren Pathak)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: OS/2 Resources - Control Window Definition
  5. Message-ID: <pathak-300792095416@virtual.mitre.org>
  6. Date: 30 Jul 92 14:04:14 GMT
  7. References: <10930@platypus.uofs.uofs.edu>
  8. Sender: news@linus.mitre.org (News Service)
  9. Followup-To: comp.os.os2.programmer
  10. Organization: Mitre Corporation
  11. Lines: 49
  12. Nntp-Posting-Host: virtual.mitre.org
  13.  
  14. In article <10930@platypus.uofs.uofs.edu>, das11@starling.cs.uofs.edu
  15. (David Sobeski) wrote:
  16. >     once again, i am going to post this question to anyone with
  17. >     some insight...
  18. >     problem : i want to allow a user to change the position of
  19. >           controls on the screen.  in fact, i want to create
  20. >           a dialog box editor-like application that will allow
  21. >           a user to customize the interface.  instead of saving
  22. >           the changes to a .RES file, i want to make the changes
  23. >           directly to the .EXE.  under the macintosh environment,
  24. >           api's are provided for this type of functionality.
  25. >           are there equivalents in os/2?  if these functions do
  26. >           not exist, is the format of the .EXE defined well
  27. >           enough that i can make the changes by writing directly
  28. >           to the .EXE?
  29. >     any insight is appreciated.
  30.  
  31. While the Macintosh allows you to make changes to the Resource fork of the
  32. application, this is not the recommended approach.  On the Mac, User
  33. preferences (i.e. positions of controls on the screen) are stored in a
  34. Preferences file.  This convention was something that the Mac programmer's
  35. community evolved and to accomodate this, Apple actually created a special
  36. "Preferences" folder inside the main System so apps have a standard place
  37. to store user preferences.
  38.  
  39. Reasons for not user the Resource fork:
  40. 1) if the application is locked, the save fails.
  41. 2) if the application is on a locked floppy, the save fails.
  42. 3) if the application is on a server, the save is a bad thing to do
  43.   - if the server allows only read access to the app, the save fails.
  44.   - if the server allows  read/write access, you may have wiped out someone
  45. else preference.
  46.  
  47.  
  48. In other word, you are much better off creating a file and storing it
  49. somewhere.
  50.  
  51. -------------------------------------------------------------------------
  52. Heeren Pathak                      | Millions long for immortality who do 
  53. pathak@mitre.org                   | not know what to do with themselves
  54. Mitre Corporation                  | on a rainy Sunday afternoon.
  55. (617) 271-7465                     |                       -- Susan Ertz
  56. -------------------------------------------------------------------------
  57. Disclaimer: Mine not Mitre's.
  58.