[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Resources (Re: Sed)
- Subject: Re: Resources (Re: Sed)
- From: rwifall@nmsu.edu (Richard J Wifall)
- Date: 7 May 93 12:32:01
- Followup-to: comp.sys.apple2
- In-reply-to: vandry@CAM.ORG's message of 6 May 1993 13:29:30 -0400
- Newsgroups: comp.sys.apple2
- Organization: NMSU Computer Science
- References: <C6Ewn9.G3z@ns1.nodak.edu> <1993May4.223114.19339@gallant.apple.com> <C6JAHH.HMu@news.cso.uiuc.edu> <1993May5.034410.14502@news.columbia.edu> <1sbhtq$gi6@altitude.HIP.CAM.ORG>
In article <1sbhtq$gi6@altitude.HIP.CAM.ORG> vandry@CAM.ORG (Phillip Vandry) writes:
I used to hate resources too... Until I used them.. Then I
decided that they were beyond merely cool. Resources make the
programmers life so much easier. (Especially in desktop applications)
Imagine if you have a data file that you want to store multiple
pictures in. Well with a data fork, you have to load the whole file
probably, then compute the offset of the particular picture you want,
then copy it to a new location to use it. With resources you can
simply "load picture 1" and then "load picture 5" just by passing
different resource id numbers (or even names if you want to)
> If you assume users are going to do stupid things you are (1) insulting
> the user's intelligence (2) limiting yourself to novice-safe systems.
If you really think users are that smart, ask Ian about the
people that sent him mail wondering why MODZap wouldn't make music
when the (!mod) files they loaded were part of the system software.
Haven't you ever had it where you were copying a program and
you accidently forgot to copy one of the data files? And then maybe
wondered why it didn't work? With resources, a simple mistake like
that couldn't happen because you just copy one file.. There is nothing
to forget to copy.
Resources also all the system to be both "novice-safe" yet also
allow the more experienced person with a resource editor, go in and
change the programs interface easily.
> By that philosophy,. you'd better not make a program because the user
> might delete it! That philosophy is too Mac-ish.
> data in seperate files allows for flexible configuration. Like I said
> in csa2, if you don't like the title page delete the file "Title.Page".
You can easily do this with a resource editor and a program
that has the picture in it's resource fork.
BTW internationalization is easier because the end user can
easily change resources, but it's much more difficult to go in and
sector edit a file for similar changes.
Datafiles just aren't the way to go for many things (althought
I admit, they are for some) Imagine you have one hundred 10 byte data
types that you wanted your file to have access to.. Either you save
them as 100 files.. (lots and lots of wasted disk space there) or you
do like I said above, and put them in one big datafile and parse them
yourself. (Yuck) or you use resources.
| Phillip Vandry | Vandry@Cam.Org | Suicide (n.): What to do if Macs |
--
-- Richard Wifall - rwifall@nmsu.edu - 65816 programmer for hire