comp.lang.ada
 help / color / mirror / Atom feed
* Re: Ada to Motif bindings
  2000-04-03  0:00 Ada to Motif bindings John Standard
@ 2000-04-03  0:00 ` David Botton
  2000-04-05  0:00 ` Glen Cornell
  2000-04-05  0:00 ` Ada to XRT bindings John Standard
  2 siblings, 0 replies; 18+ messages in thread
From: David Botton @ 2000-04-03  0:00 UTC (permalink / raw)


See http://www.adapower.com/reuse

David Botton

John Standard wrote in message <38E8E8CE.81EC851F@mitre.org>...
>Hello,
>
>    I am looking for a library that contains bindings from Ada to
>Motif.  I have been searching (without luck), on the Web.  Are there
>still companies which support this type of product or is there an
>archive which stores freely distributable software?
>
>Thanks,
>    John Standard
>    The Mitre Corporation
>






^ permalink raw reply	[flat|nested] 18+ messages in thread

* Ada to Motif bindings
@ 2000-04-03  0:00 John Standard
  2000-04-03  0:00 ` David Botton
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: John Standard @ 2000-04-03  0:00 UTC (permalink / raw)


Hello,

    I am looking for a library that contains bindings from Ada to
Motif.  I have been searching (without luck), on the Web.  Are there
still companies which support this type of product or is there an
archive which stores freely distributable software?

Thanks,
    John Standard
    The Mitre Corporation





^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-03  0:00 Ada to Motif bindings John Standard
  2000-04-03  0:00 ` David Botton
@ 2000-04-05  0:00 ` Glen Cornell
  2000-04-05  0:00   ` Ted Dennison
  2000-04-05  0:00   ` Larry Kilgallen
  2000-04-05  0:00 ` Ada to XRT bindings John Standard
  2 siblings, 2 replies; 18+ messages in thread
From: Glen Cornell @ 2000-04-05  0:00 UTC (permalink / raw)


The only commercial Ada bindings I know of are from Advanced Technology
Center (http://www.atc.com) The product name is AXI (Ada to X
Interface).  The bindings are quite good and complete.  You can even
write a Widget in Ada.

You're entering a domain where not a lot of people naturally do their
work.  Most X programmers use C or C++ as their language of choice.
You'll just get some slim pickin's, if you're looking for someone who
*knows* Ada and Xlib/Xt/Motif.

Glen




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-05  0:00 ` Glen Cornell
  2000-04-05  0:00   ` Ted Dennison
@ 2000-04-05  0:00   ` Larry Kilgallen
  1 sibling, 0 replies; 18+ messages in thread
From: Larry Kilgallen @ 2000-04-05  0:00 UTC (permalink / raw)


In article <38EAC651.1DD94F40@home.com>, Glen Cornell <the.cornells@home.com> writes:

> You're entering a domain where not a lot of people naturally do their
> work.  Most X programmers use C or C++ as their language of choice.
> You'll just get some slim pickin's, if you're looking for someone who
> *knows* Ada and Xlib/Xt/Motif.

My natural approach for writing a GUI interface for an Ada program
is to just call Motif from Ada, in my case using the bindings that
come with the compiler.

I don't try to write widgets in Ada, butcause that is not my need.




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-05  0:00 ` Glen Cornell
@ 2000-04-05  0:00   ` Ted Dennison
  2000-04-05  0:00     ` Marc CHEVRIER
  2000-04-06  0:00     ` Glen Cornell
  2000-04-05  0:00   ` Larry Kilgallen
  1 sibling, 2 replies; 18+ messages in thread
From: Ted Dennison @ 2000-04-05  0:00 UTC (permalink / raw)


In article <38EAC651.1DD94F40@home.com>,
  Glen Cornell <the.cornells@home.com> wrote:
> You're entering a domain where not a lot of people naturally do their
> work.  Most X programmers use C or C++ as their language of choice.
> You'll just get some slim pickin's, if you're looking for someone who
> *knows* Ada and Xlib/Xt/Motif.

I wouldn't say that. I've don a fair bit of Ada/Motif work. I'd say that
in many ways Ada combined with UIL is a much better way to do GUI
development than C or C++ with Motif.


--
T.E.D.

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


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




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-05  0:00     ` Marc CHEVRIER
@ 2000-04-05  0:00       ` Ted Dennison
  0 siblings, 0 replies; 18+ messages in thread
From: Ted Dennison @ 2000-04-05  0:00 UTC (permalink / raw)


In article <38EB67AE.812FD691@businessobjects.com>,
  Marc CHEVRIER <mchevrier@businessobjects.com> wrote:
>
> You can also try a pure Ada approach for your Motif programming.
> Have a look to http://ourworld.compuserve.com/homepages/topgraphx

The problem with a "pure" Ada approach is that its a lot tougher to
integrate with a GUI builder. Anyone seriously developing GUI's these
days uses some sort of GUI builder (or they have *very* patient
clients). All decent Motif GUI builders are capable of saving and
reading UIL code, so you have your choice of tools.

This approach allows you to:
   o  Modify GUI source code directly for small tweaks without having
the next run of the builder wipe out your work.
   o  Switch GUI builders later if you want or need to without having to
rewrite or redraw anything.
   o  Cleanly separate the GUI development effort from the application
effort.
   o  Only create objects in your Ada code for widgets that you need to
read or modify directly from the application (usually a very small
subset of all the widgets in a Motif application).
   o  Develop your own Motif bindings piecmeal on an as-needed basis.
   o  Detect many GUI coding errors at (UIL) compile time rather than
runtime.

So what are the drawbacks? Loading UID files takes a bit of time while
the file gets interpreted and all the widgets get created. In a normal
Motif app you could amortize this time by only creating widgets as they
are first needed. So you trade startup time for runtime. You can't use
any special features of your GUI builder that go outside the bounds of
Motif. So here you potentially trade functionality for portability.
That's about it, and I can usualy agree with both of those trade-offs.

--
T.E.D.

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


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




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Ada to XRT bindings
  2000-04-03  0:00 Ada to Motif bindings John Standard
  2000-04-03  0:00 ` David Botton
  2000-04-05  0:00 ` Glen Cornell
@ 2000-04-05  0:00 ` John Standard
  2000-04-15  0:00   ` james hopper
  2 siblings, 1 reply; 18+ messages in thread
From: John Standard @ 2000-04-05  0:00 UTC (permalink / raw)




    Looking into the project further, it turns out that we can probably
get Ada to Motif bindings.  However, we are planning on using an add-on
widget set by the KLGroup called XRT.  It provides some unconventional
widgets that are needed for the user interface.  This API is written in
C, so Ada bindings will need to be created to interface with this
library.  I'm told the call through to the XRT API shouldn't be that
difficult to write, but setting and catching the callbacks could be more
difficult.  Has any one had any experience with this type of
programming?

John Standard

John Standard wrote:

> Hello,
>
>     I am looking for a library that contains bindings from Ada to
> Motif.  I have been searching (without luck), on the Web.  Are there
> still companies which support this type of product or is there an
> archive which stores freely distributable software?
>
> Thanks,
>     John Standard
>     The Mitre Corporation





^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-05  0:00   ` Ted Dennison
@ 2000-04-05  0:00     ` Marc CHEVRIER
  2000-04-05  0:00       ` Ted Dennison
  2000-04-06  0:00     ` Glen Cornell
  1 sibling, 1 reply; 18+ messages in thread
From: Marc CHEVRIER @ 2000-04-05  0:00 UTC (permalink / raw)



You can also try a pure Ada approach for your Motif programming.
Have a look to http://ourworld.compuserve.com/homepages/topgraphx



Ted Dennison wrote:
> 
> In article <38EAC651.1DD94F40@home.com>,
>   Glen Cornell <the.cornells@home.com> wrote:
> > You're entering a domain where not a lot of people naturally do their
> > work.  Most X programmers use C or C++ as their language of choice.
> > You'll just get some slim pickin's, if you're looking for someone who
> > *knows* Ada and Xlib/Xt/Motif.
> 
> I wouldn't say that. I've don a fair bit of Ada/Motif work. I'd say that
> in many ways Ada combined with UIL is a much better way to do GUI
> development than C or C++ with Motif.
> 
> --
> T.E.D.
> 
> http://www.telepath.com/~dennison/Ted/TED.html
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-05  0:00   ` Ted Dennison
  2000-04-05  0:00     ` Marc CHEVRIER
@ 2000-04-06  0:00     ` Glen Cornell
  2000-04-06  0:00       ` dale
  1 sibling, 1 reply; 18+ messages in thread
From: Glen Cornell @ 2000-04-06  0:00 UTC (permalink / raw)




Ted Dennison wrote:
> 
> I wouldn't say that. I've don a fair bit of Ada/Motif work. I'd say that
> in many ways Ada combined with UIL is a much better way to do GUI
> development than C or C++ with Motif.
> 

But you are just one of a few.  How many more at your facility are able
to write Motif code in Ada?  This is not rocket science, but you don't
see that many Ada people who are proficient in X.  Back in the old days,
calbacks were difficult to implement and were Ada-compiler dependent. 
Ada tasking on a Unix system was sometimes implemented with SIGALARM
instead of the current threads-based approach, which messed with the
workings of the early X toolkit.  Of course, there's the ever-present
problems of converting Ada types to and from c types.  For most X
programmers, this is too much hassle to write an X application in Ada.

As for using UIL, I too am a proponent of its use.  However, the amount
of Motif in Ada coding diminishes when you use Mrm. This is a good thing
for all of the reasons you pointed out.  For 98% of the user interfaces
out there, UIL does the job well.  But I'm talking about window
managers, widget sets, CAD packages or other lower-level Xlib
applications that require someone with a good deal of Xlib/Xt/Xm
experience to design and code well.  There just aren't that many
programmers out there.  Why?  Because the language doesn't fit the
Xlib/Xt/Xm model well.




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-06  0:00     ` Glen Cornell
@ 2000-04-06  0:00       ` dale
  2000-04-10  0:00         ` Glen Cornell
  0 siblings, 1 reply; 18+ messages in thread
From: dale @ 2000-04-06  0:00 UTC (permalink / raw)


Glen Cornell  wrote:

> Of course, there's the ever-present
> problems of converting Ada types to and from c types.  For most X
> programmers, this is too much hassle to write an X application in Ada.
> 
> [...] There just aren't that many
> programmers out there.  Why?  Because the language doesn't fit the
> Xlib/Xt/Xm model well.


I think it fits it as well as C does. The (limited set) of programs
that i've written were no more difficult than in C.

What features in Ada do you feel causes such a mismatch?

Dale




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-06  0:00       ` dale
@ 2000-04-10  0:00         ` Glen Cornell
  2000-04-10  0:00           ` Ted Dennison
                             ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Glen Cornell @ 2000-04-10  0:00 UTC (permalink / raw)


> What features in Ada do you feel causes such a mismatch?

Ah! A loaded question.  I wouldn't be so foolish to voice my opinion to
the world!

I will point out that Xlib/Xt/Xm programming in Ada brings a new source
of potential errors:

1. Ada-c type conversions.
2. Ada run-time conflicts with the Xt process model.
3. Ada threads and the single-threaded nature of X.

Glen




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-10  0:00         ` Glen Cornell
  2000-04-10  0:00           ` Ted Dennison
@ 2000-04-10  0:00           ` Dale Stanbrough
  2000-04-10  0:00           ` Larry Kilgallen
  2 siblings, 0 replies; 18+ messages in thread
From: Dale Stanbrough @ 2000-04-10  0:00 UTC (permalink / raw)


Glen Cornell wrote:

> Ah! A loaded question.  I wouldn't be so foolish to voice my opinion to
> the world!
> 
> I will point out that Xlib/Xt/Xm programming in Ada brings a new source
> of potential errors:
> 
> 1. Ada-c type conversions.

The family of packages Interfaces.C{.xx} provides good support for
talking to C with compatable types. Certainly roll your own bindings
would be subject to errors. Computer generated ones perhaps less so.
I generally had good experiences with the X/Motif bindings.


> 2. Ada run-time conflicts with the Xt process model.

Not quite sure what you mean here. Perhaps you could give an example.

> 3. Ada threads and the single-threaded nature of X.

Not a problem if you don't use Ada tasks, so there it is no
worse than C.

The only real area that -is- painful, is the use of variable argument
lists (XtVaAppInitialize is an example)


Dale




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-10  0:00         ` Glen Cornell
  2000-04-10  0:00           ` Ted Dennison
  2000-04-10  0:00           ` Dale Stanbrough
@ 2000-04-10  0:00           ` Larry Kilgallen
  2000-04-11  0:00             ` Simon Wright
  2 siblings, 1 reply; 18+ messages in thread
From: Larry Kilgallen @ 2000-04-10  0:00 UTC (permalink / raw)


In article <38F17693.F32F2074@home.com>, Glen Cornell <the.cornells@home.com> writes:
>> What features in Ada do you feel causes such a mismatch?
> 
> Ah! A loaded question.  I wouldn't be so foolish to voice my opinion to
> the world!
> 
> I will point out that Xlib/Xt/Xm programming in Ada brings a new source
> of potential errors:
> 
> 1. Ada-c type conversions.
> 2. Ada run-time conflicts with the Xt process model.
> 3. Ada threads and the single-threaded nature of X.

But the single-threaded nature of X is an issue in any programming
language.  If you have a requirement to use multiple execution
contexts in parallel, you better do it in separate processes,
regardless of programming language.




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-10  0:00         ` Glen Cornell
@ 2000-04-10  0:00           ` Ted Dennison
  2000-04-11  0:00             ` Simon Wright
  2000-04-10  0:00           ` Dale Stanbrough
  2000-04-10  0:00           ` Larry Kilgallen
  2 siblings, 1 reply; 18+ messages in thread
From: Ted Dennison @ 2000-04-10  0:00 UTC (permalink / raw)


In article <38F17693.F32F2074@home.com>,
  Glen Cornell <the.cornells@home.com> wrote:
> > What features in Ada do you feel causes such a mismatch?
>
> I will point out that Xlib/Xt/Xm programming in Ada brings a new
source
> of potential errors:
>
> 1. Ada-c type conversions.

That's kind of puzzing. Most objects X deals with are "cookie"
objects, for which the internal structure is not to be mucked with.
So there's really no need to do type conversions when using *either*
language. Anyway, this is a binding issue. If the bindings have been
properly tested, you don't have any problem here.

> 2. Ada run-time conflicts with the Xt process model.

Ditto. If the bindings have been tested for this, then this is *not* an
issue for the bindings' users.

> 3. Ada threads and the single-threaded nature of X.

This is an issue with C as well. The only difference is that Ada
supports threads and C users have to go to the OS to get them. That just
means that C users tend to be less aware of this potential source of
problems than Ada users.

As an aside, I have seen X/Motif bindings that made the whole X/Motif
subsystem task-safe by wrapping a synchronizing task around all the
calls. This actually *removes* a potential source of errors that C X
coders have to deal with. :-)

--
T.E.D.

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


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




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-10  0:00           ` Ted Dennison
@ 2000-04-11  0:00             ` Simon Wright
  2000-04-12  0:00               ` Jean-Pierre Rosen
  0 siblings, 1 reply; 18+ messages in thread
From: Simon Wright @ 2000-04-11  0:00 UTC (permalink / raw)


Ted Dennison <dennison@telepath.com> writes:

> As an aside, I have seen X/Motif bindings that made the whole X/Motif
> subsystem task-safe by wrapping a synchronizing task around all the
> calls. This actually *removes* a potential source of errors that C X
> coders have to deal with. :-)

Or, with X11R6 (OK, your X vendor needs to have built X with threading
support :), use XInitThreads(), XtToolkitThreadInitialize() (but I
don't know what happens with Motif).




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-10  0:00           ` Larry Kilgallen
@ 2000-04-11  0:00             ` Simon Wright
  0 siblings, 0 replies; 18+ messages in thread
From: Simon Wright @ 2000-04-11  0:00 UTC (permalink / raw)


kilgallen@eisner.decus.org (Larry Kilgallen) writes:

> But the single-threaded nature of X is an issue in any programming
> language.  If you have a requirement to use multiple execution
> contexts in parallel, you better do it in separate processes,
> regardless of programming language.

We had success using separate Display contexts, one per execution
thread that needed to interact with X. As I remember, one was for
standard GUI (buttons etc), the other drew a labelled plan display of
some sort. Just need to pass window IDs around ..




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to Motif bindings
  2000-04-11  0:00             ` Simon Wright
@ 2000-04-12  0:00               ` Jean-Pierre Rosen
  0 siblings, 0 replies; 18+ messages in thread
From: Jean-Pierre Rosen @ 2000-04-12  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 893 bytes --]

Simon Wright <simon@pogner.demon.co.uk> a �crit dans le message :
x7vln2lmatq.fsf@pogner.demon.co.uk...
> Ted Dennison <dennison@telepath.com> writes:
>
> > As an aside, I have seen X/Motif bindings that made the whole X/Motif
> > subsystem task-safe by wrapping a synchronizing task around all the
> > calls. This actually *removes* a potential source of errors that C X
> > coders have to deal with. :-)
>
> Or, with X11R6 (OK, your X vendor needs to have built X with threading
> support :), use XInitThreads(), XtToolkitThreadInitialize() (but I
> don't know what happens with Motif).

Or use XinAda from TopGraph'X
(http://ourworld.compuserve.com/homepages/topgraphx), which is 100% task
safe (and written in Ada).

--
---------------------------------------------------------
           J-P. Rosen (Rosen.Adalog@wanadoo.fr)
Visit Adalog's web site at http://pro.wanadoo.fr/adalog






^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Ada to XRT bindings
  2000-04-05  0:00 ` Ada to XRT bindings John Standard
@ 2000-04-15  0:00   ` james hopper
  0 siblings, 0 replies; 18+ messages in thread
From: james hopper @ 2000-04-15  0:00 UTC (permalink / raw)



Motorolas Common Ground System uses XRT and about 250k SLOCs of it are
in ada.  i just ported it all to gnat and the ada95 x bindings.  they
had done a binding to xrt themselves which i modified a bit.  it was
very straight forward.  if i had done it from scratch it would not have
been a big deal at least the stuff that we used.  its hard to be
precise here, but no its not that big a deal.

best jim


In article <38EB5093.9B41ED88@mitre.org>, John Standard <jks@mitre.org>
wrote:

>     Looking into the project further, it turns out that we can probably
> get Ada to Motif bindings.  However, we are planning on using an add-on
> widget set by the KLGroup called XRT.  It provides some unconventional
> widgets that are needed for the user interface.  This API is written in
> C, so Ada bindings will need to be created to interface with this
> library.  I'm told the call through to the XRT API shouldn't be that
> difficult to write, but setting and catching the callbacks could be more
> difficult.  Has any one had any experience with this type of
> programming?




^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2000-04-15  0:00 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-03  0:00 Ada to Motif bindings John Standard
2000-04-03  0:00 ` David Botton
2000-04-05  0:00 ` Glen Cornell
2000-04-05  0:00   ` Ted Dennison
2000-04-05  0:00     ` Marc CHEVRIER
2000-04-05  0:00       ` Ted Dennison
2000-04-06  0:00     ` Glen Cornell
2000-04-06  0:00       ` dale
2000-04-10  0:00         ` Glen Cornell
2000-04-10  0:00           ` Ted Dennison
2000-04-11  0:00             ` Simon Wright
2000-04-12  0:00               ` Jean-Pierre Rosen
2000-04-10  0:00           ` Dale Stanbrough
2000-04-10  0:00           ` Larry Kilgallen
2000-04-11  0:00             ` Simon Wright
2000-04-05  0:00   ` Larry Kilgallen
2000-04-05  0:00 ` Ada to XRT bindings John Standard
2000-04-15  0:00   ` james hopper

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