Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!purdue!decwrl!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Scrap Management, User Preferences Message-ID: <28905@ucbvax.BERKELEY.EDU> Date: 26 Apr 89 04:08:06 GMT References: <1833@etive.ed.ac.uk> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 33 In article <1833@etive.ed.ac.uk> nick@lfcs.ed.ac.uk (Nick Rothwell) writes: >(i) Scrap Management. I've implemented CUT/COPY/PASTE/CLEAR (together > with UNDO and REDO for all of these... it wasn't easy...). But, > I'm only interested (for now) in cutting and pasting my own private > kinds of objects. So, I've done it myself, with a couple of Handles > for the clipboard and such like. Is there anything wrong with this? > Why should I use the scrap manager for things which aren't TEXT or > PICT, and therefore don't make sense for anybody else? If you externalize your scrap, and use the scrap manager, even if it is a private type, the user can save scraps on the scrapbook. That can be very convenient for the user. By rights, you should put a dual representation on the scrapbook: a TEXT, say, and your private type. That way the user can see some difference between two scraps from your program. >(ii) User preferences: what's the official sanctioned way of saving user > preferences in an application? A data file in the System Folder? A > resource file? The data fork of the application? I personally prefer > this last option, although it won't work on shared or protected > volumes. A file, either data or resoruce, that you find using poor-man's-search-path, is the recommended way to go. That way, if you're application has been marked read only, and is being shared over a net, each user can have their own preferences in their own system folder. Or, you can encourage users to double click on "Stationery" files. This solution is better, since it allows the user the effect of multiple preferences files (say two people share one mac.) --- David Phillip Oster --"Bush says he wants to be our 'education' Arpa: oster@dewey.soe.berkeley.edu --president. Well, He's our most intellectual Uucp: ucbvax!oster%dewey.soe.berkeley.edu --president in 8 years."--Swaine