Resource Files (Was: Re: [GUI] More points for the technical discussion)

Seth Kurtzberg
Mon, 17 Feb 2003 10:11:55 -0700


There is a standard format used with X for application specific configuration.  
However, X is agnostic about whether this information is in one file, a 
separate file for each app, or some combination.  .Xdefaults in the home 
directory is a typical place.  You would not want to bundle the configuration 
information into the same file as the program itself in an X environment.

I don't know if I would agree that customization and theming are the primary 
reason that resource-type files are used in X.  It is true that such 
information can be included in these files, but other types of info are also 
included there.  It is more of a general mechanism to fetch something that 
can be specified without rebuilding the application.  So it is relevant here, 
even though it also has other uses in X.

On Monday 17 February 2003 05:51 am, Wolfgang Thaller wrote:
> On Monday, February 17, 2003, at 02:40 AM, Seth Kurtzberg wrote:
> > I would phrase it slightly differently.  We should have a
> > platform-independent
> > API related to resources, which in some cases may use underlying
> > capabilities
> > of the target O/S.
> On Monday, February 17, 2003, at 11:03 AM, Axel Simon wrote:
> > I definitely agree to that. IMHO it is very important to use the
> > toolkit's
> > capability to custumize and internationalize the application. Every
> > platform has it, Windows has .rc files, Gtk has style files and Apple
> > has
> > its functionality. If we don't make use of these facilities we wind up
> > writing a toy (educational) API where you have 6 color constants and 3
> > font constants and use them blindly.
> Are you sure we're talking about the same resource files here?
> Resources on MacOS, and, as far as I know, on Windows, have nothing to
> do with customization - whereas IIRC customization and "theming" are
> the main purpose of X11 resources and GTK style files.
> I was responding to Glynn Clements' statement that "User-visible text
> doesn't belong in the source code". For Mac OS apps, it belongs in the
> dialog templates (the "nib" file, a binary format editable only with
> Apple's Interface Builder application) and in string tables (nowadays,
> XML files). We don't want to end up having to draw all dialogs three
> times with three different (and possibly proprietary and
> single-platform) tools, or having to write down all user-visible text
> in three different file formats.
> On the other hand, it would be great to be able to store bitmaps and
> other data in the .EXE file's resources on Windows, and in the
> appropriate application wrapper on Mac OS, rather than cluttering the
> application directory with many files.
> As far as X-style customization is concerned, are there any features
> that you would expect that don't come for free?
> As a MacOS developer, I'd just expect some library to provide me with a
> way to say "store this data in the preferences/settings/defaults file"
> (which should be put in the standard location for preferences files).
> Do I have to use a particular resource format in order to be a "good
> citizen" on X11?
> Cheers,
> Wolfgang
> _______________________________________________
> GUI mailing list

Seth Kurtzberg
M. I. S. Corp.