From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f72c7d988369817f X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: Ada 95 S/W Eng Date: 2000/07/19 Message-ID: <8l4bqr$las$1@nnrp1.deja.com>#1/1 X-Deja-AN: 648194422 References: <8kvb9c$r13$1@slb7.atl.mindspring.net> <3973A59B.75E0FD00@freeoutpost.com> <8l1mou$m2a$1@nnrp1.deja.com> <3974D8FA.27F8E628@silver.jhuapl.edu> X-Http-Proxy: 1.0 x61.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Jul 19 13:52:35 2000 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (WinNT; I) Date: 2000-07-19T00:00:00+00:00 List-Id: In article <3974D8FA.27F8E628@silver.jhuapl.edu>, Scott Ingram` 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.