T.R | Title | User | Personal Name | Date | Lines |
---|
954.1 | | CASEE::LACROIX | Gone with the wind | Thu Jun 15 1989 10:17 | 6 |
| > How to write an ada widget?
Forget it. And I mean it.
Denis.
|
954.2 | | QUARK::LIONEL | B - L - Oh, I don't know! | Thu Jun 15 1989 11:20 | 17 |
| Documentation on using Ada with DECwindows, such as there is, is in the
V5.1 release notes. (Hold on to that, too, because the material was pulled
from the V5.2 release notes.)
It is no mystery to anyone that the DECwindows application interface was
designed specifically for C, with little consideration for other languages.
Documentation on using other languages with DECwindows is minimal, though
there is some work going on for FORTRAN.
I have not tried to write a widget in Ada, but I know it has been done, so
I would not pay much attention to reply .1. If it is possible in any
non-C language, it is possible in Ada, which is probably better equipped to
deal with the vagaries of DECwindows than any other non-C language. The
learning curve is steep, though. Examples help.
Steve
|
954.3 | the journey is the reward | CALL::SWEENEY | Gotham City's Software Consultant | Thu Jun 15 1989 20:55 | 19 |
| I'm just crazy enough to have tried. I didn't meet with success in
writing a widget in ADA to the point where I would post it with pride
in the examples conference. (I did however for some C widgets)
The fundamental problem has already been mentioned: the toolkit does
has a C orientation somewhat (which is mitigated by the VAX bindings) but
some intrinsics and widget proto-matter most definitely do have C
orientation and for them there is no VAX bindings.
The biggest problem turns out _not_ to be creating SYSTEM.ADDRESS for
all the pointers that are required, but the lack of available SDL
(structure definition language) for the data structures and certain
well-known weaknesses in the SDL/ADA combination.
But overcome that hurdle and create your own ADA object definitions,
and creating an ADA widget should be possible. VAX ADA has all the VMS
and LINKER specific hooks to permit it. Definitely not one's first ADA
program however...
|
954.4 | How much is Ada worth to DEC? | GSRC::DIX | I guess I do windows now... | Thu Jun 29 1989 12:51 | 28 |
| >>
>> Documentation on using Ada with DECwindows, such as there is, is in the
>> V5.1 release notes. (Hold on to that, too, because the material was pulled
>> from the V5.2 release notes.)
>>
>> It is no mystery to anyone that the DECwindows application interface was
>> designed specifically for C, with little consideration for other languages.
>> Documentation on using other languages with DECwindows is minimal, though
>> there is some work going on for FORTRAN.
>>
I think there is a real problem here. Digital is considered to be the
industries largest Ada development environment yet we can't even produce
documentation on how to use DECwindows in Ada.
This causes a real problem with the group I'm with since we're working
on a $50M project with a customer and it's entirely in Ada. Being a
group that works with the military (Government Solutions Resource
Center) I can imagine that the $50M will grow considerably in the near
future. With the current salary freeze, I don't want to be the one to
go to our customer and explain why we don't have any documentation on
DECwindows in Ada.
Signed,
A frustrated Ada/DECwindows programmer
|
954.5 | | QUARK::LIONEL | B - L - Oh, I don't know! | Thu Jun 29 1989 13:37 | 26 |
| We DO have documentation on using DECwindows with Ada. But not a lot is
needed.
The whole idea of a common application programming interface is that you need
only document it ONCE, and each language can use the information provided.
Yes, there are small things that need to be known (such as the names of the
bindings files, etc.), but this need not be more than a few pages. This
information is provided for VMS V5.1 in the Release Notes.
What would be nice is for the examples to start migrating to other languages
from C. There is work being done on this now.
I remember VMS V1 when all of the examples were in MACRO.
Ada is actually ahead of just about every language other than C by having
complex examples provided with DECwindows. With these and the documentation
(and a bit of browsing of the package definitions) it is actually rather
easy to write DECwindows applications in Ada.
I am not familiar with creating widgets, so I don't know what the issues
are. If it's possible to do it in any language other than C, it should
be possible in Ada. If I get a chance, I'll look into it. (And then figure
out how to do it in FORTRAN as well!)
Steve
|
954.6 | Release notes aren't much help! | GSRC::DIX | I guess I do windows now... | Fri Jun 30 1989 13:24 | 67 |
| Steve,
I've read the sections in the VMS Version 5.1 Release Notes (and
the sections in the Version 5.1 VAX/VMS Systems Field Service Advisory)
dealing with DECwindows. Neither of those documents have the information
that is needed in order to write Ada DECwindows applications using the
C documentation. What is needed is what was asked for in the first note
here, a mapping of the C data types into Ada. There are several instances
where there is NO obvious (or even hidden) match between the data types.
The following are just a few:
C types Ada types
============== ===================
1) Used in the calls to passed into the Ada calls to
draw point(s) draw point(s)
typedef struct { unsigned_longword_array
short x,y;
} XPoint;
2) Used in the call to passed to the Ada version
draw line segments
typedef struct { unsigned_longword_array
short x1, y1, x2, y2;
} XSegment;
3) Used for defining action tables Passed into Ada version of Add_Actions
typedef struct _XtActionsRec { Address
String action_name;
XtActionProc action_proc;
} XtActionsRec, *XtActionList;
As stated these are just a few examples, all of the graphics routines
(i.e. lines, segments, circles, arcs) are the same as the examples above.
As for the action tables, I've tried creating an Ada data structure
similar to the C data structure and passing in the address to the Add_Actions
procedure but I keep getting ACCVIOs. I've also tried using a record structure
(similar to XPoint) and mapping it into an unsigned_longword_array through the
package system for the Draw_Points procedure but with no success. I don't
know if it's something I'm doing wrong, something in the way the data types
needs to be defined, or if there's an error in the Ada interface.
I'm not trying to beat up on the DECwindows or documentation people,
if we were working in C I don't thing there would be any problems at all. I'm
just trying to point out the dissadvantage people working in other languages
have due to a lack of documentation. Any time a problem arises in a DECwindows
program (in a language other than C) there are at least 4 things to look at:
1) Are the data types defined correctly?
2) Are the parameters being passed correctly?
3) Is the interface correct?
4) Am I implementing the calls correctly?
If someone out there IS working on a mapping of the C data types into
Ada, or at least has some hints as to how to use (and get to work) the current
Ada data types (address, unsigned_longword_array, etc.), us Ada people would
really appreciate some input.
Thanks for any input.
Sandy
|
954.7 | | QUARK::LIONEL | Free advice is worth every cent | Fri Jun 30 1989 14:34 | 16 |
| The Ada bindings files supplied with DECwindows are supposed to be the
"translations" you're asking for. Please QAR against DECwindows any
missing or incorrect definitions so that we can fix them. (A caveat - I'm
not working on these any more, but someone else is.)
If you're having problems with Ada, it's very likely that FORTRAN, Pascal,
BLISS, PL/I, BASIC and other languages would have similar problems.
The "VAX bindings" are produced from SDL files that are separate from the
MIT C files used for the MIT C bindings. They're big and they have errors,
the more you tell us about them, the more we can fix them. Sometimes the
SDL doesn't have the right setup to mimic the MIT C definitions. That can
usually be fixed. Help us do it.
Steve
|
954.8 | Release notes info now in Guide to Application Programming
| TLE::MORRIS | Greg Morris | Wed Jul 12 1989 14:03 | 13 |
| RE: .2
>Documentation on using Ada with DECwindows, such as there is, is in the
>V5.1 release notes. (Hold on to that, too, because the material was pulled
>from the V5.2 release notes.)
Appendix B "DECwindows Ada Programming Interfaces" of the VMS Version 5.1
Release Notes is not present in the V5.2 notes because this information has
been made a part of the DECwindows documentation. It is now an appendix to
the Guide to Application Programming.
Greg
|
954.9 | Order number for doc update? | STOAT::BARKER | Jeremy Barker - NAC Europe - REO2-G/J2 | Mon Jul 31 1989 12:20 | 17 |
| Re: .8
> Appendix B "DECwindows Ada Programming Interfaces" of the VMS Version 5.1
> Release Notes is not present in the V5.2 notes because this information has
> been made a part of the DECwindows documentation. It is now an appendix to
> the Guide to Application Programming.
I assume that there is a *new* version of the "Guide to Application
Programming" when VMS V5.2 hits the streets. I say that because there is
no such appendix in the DECwindows doc set I recently received from SSB.
If this is true, what is (will be) the order number for the update.
Thanks
jb
|
954.10 | Will be in appendix B | G::MORRIS | Greg Morris | Wed Sep 06 1989 19:58 | 9 |
| Re: .9
Hi!
The information from the 5.1 release notes is being added to appendix B
"Using the VAX Bindings" of the VMS DECwindows Guide to Application
Programming. Don't know what the order number would be.
Greg
|