comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: Ada 95 S/W Eng
Date: 2000/07/19
Date: 2000-07-19T00:00:00+00:00	[thread overview]
Message-ID: <8l4bqr$las$1@nnrp1.deja.com> (raw)
In-Reply-To: 3974D8FA.27F8E628@silver.jhuapl.edu

In article <3974D8FA.27F8E628@silver.jhuapl.edu>,
  Scott Ingram` <scott@silver.jhuapl.edu> wrote:
> Ted Dennison wrote:
> > something interesting done with XML there too. In particular, I'd
> > like to see something similar to Motif's UIL support. I was really
> > disappointed in the way Glade spits out tons of files that have to
> > be hand-edited (and thus hand-merged when the GUI changes).
>
> I bought a Motif license some time ago but never really had the time
> to explore UIL.  What advantages does it offer?

UIL is a language for specifying user interfaces. That much it shares
with GTK's glade XML. But Motif distributions come with a UIL compiler
that compiles the interface language, reports any errors (including
usage errors that no Ada or C compiler could catch), and builds UID
object files. These object files can be loaded from a C or Ada program
with one call, and realized with another. The only actual widgets that
your code has to worry about is the top-level widget in the hierarchy,
and any widgets it needs to access directly from callbacks for other
widgets. I like to put those in an enumeration-indexed array, so that
retreiving them from the hierarchy is only 2 more lines of code (1 for
the for loop, one for the Motif call). So instead of hundreds of lines
of grisly UI code to set up the user interface, my Ada code has 4 lines
of GUI setup code.

UIL also enforces a nice separation between my application and its GUI,
which makes the whole thing a lot easier to maintain. Also, all
installations of Motif and just about all Motif GUI builders can output
UIL, so I can switch GUI builders and platforms at will.

The drawbacks to UIL are:
  o  It can only specify the setup of GUI objects, not their dynamic
behavior. You'll need user-written callbacks with manual Motif calls to
specify behavior.
  o  It puts all the initialization overhead in one place, which can
amount to a noticable delay at startup time.
  o  Its a separate language, so anyone suffering under a
single-language "mandate" must get some kind of waiver to use it.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




      reply	other threads:[~2000-07-19  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-17  0:00 Ada 95 S/W Eng fmclifton
2000-07-17  0:00 ` Stephen Leake
2000-07-17  0:00   ` Ray Blaak
2000-07-18  0:00     ` G. de Montmollin
2000-07-18  0:00     ` Bill Greene
2000-07-17  0:00   ` Jeff Parke
2000-07-18  0:00     ` Ted Dennison
2000-07-18  0:00       ` Scott Ingram`
2000-07-19  0:00         ` Ted Dennison [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox