home *** CD-ROM | disk | FTP | other *** search
- 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
- From: pathak@mitre.org (Heeren Pathak)
- Newsgroups: comp.os.os2.programmer
- Subject: Re: OS/2 Resources - Control Window Definition
- Message-ID: <pathak-300792095416@virtual.mitre.org>
- Date: 30 Jul 92 14:04:14 GMT
- References: <10930@platypus.uofs.uofs.edu>
- Sender: news@linus.mitre.org (News Service)
- Followup-To: comp.os.os2.programmer
- Organization: Mitre Corporation
- Lines: 49
- Nntp-Posting-Host: virtual.mitre.org
-
- In article <10930@platypus.uofs.uofs.edu>, das11@starling.cs.uofs.edu
- (David Sobeski) wrote:
- >
- >
- > once again, i am going to post this question to anyone with
- > some insight...
- >
- > problem : i want to allow a user to change the position of
- > controls on the screen. in fact, i want to create
- > a dialog box editor-like application that will allow
- > a user to customize the interface. instead of saving
- > the changes to a .RES file, i want to make the changes
- > directly to the .EXE. under the macintosh environment,
- > api's are provided for this type of functionality.
- > are there equivalents in os/2? if these functions do
- > not exist, is the format of the .EXE defined well
- > enough that i can make the changes by writing directly
- > to the .EXE?
- >
- > any insight is appreciated.
- >
-
- While the Macintosh allows you to make changes to the Resource fork of the
- application, this is not the recommended approach. On the Mac, User
- preferences (i.e. positions of controls on the screen) are stored in a
- Preferences file. This convention was something that the Mac programmer's
- community evolved and to accomodate this, Apple actually created a special
- "Preferences" folder inside the main System so apps have a standard place
- to store user preferences.
-
- Reasons for not user the Resource fork:
- 1) if the application is locked, the save fails.
- 2) if the application is on a locked floppy, the save fails.
- 3) if the application is on a server, the save is a bad thing to do
- - if the server allows only read access to the app, the save fails.
- - if the server allows read/write access, you may have wiped out someone
- else preference.
-
-
- In other word, you are much better off creating a file and storing it
- somewhere.
-
- -------------------------------------------------------------------------
- Heeren Pathak | Millions long for immortality who do
- pathak@mitre.org | not know what to do with themselves
- Mitre Corporation | on a rainy Sunday afternoon.
- (617) 271-7465 | -- Susan Ertz
- -------------------------------------------------------------------------
- Disclaimer: Mine not Mitre's.
-