XWindows, ADA and C/C++ - Motif

This is a discussion on XWindows, ADA and C/C++ - Motif ; I have an ADA application, with an XWindows gui sitting on top of it. The XWindows is accessed through extern C calls from ADA. I tried, unsuccessfully, to add some C++ style motif behaviour to the app. by C++ motif ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: XWindows, ADA and C/C++

  1. XWindows, ADA and C/C++

    I have an ADA application, with an XWindows gui sitting on top of it.
    The XWindows is accessed through extern C calls from ADA.
    I tried, unsuccessfully, to add some C++ style motif behaviour to the app.
    by C++ motif style, i mean, "objects" that wrap widgets and give them extra
    functionality... much the way a builder tool like bxpro does when you tell
    it to generate c++ from your .uil file.

    anyway, to make a long story short... my changes caused coredump in a weird
    location.
    anytime I called XtMapwidget or XtUnmapWidget, the seg fault occurred within
    that Map/Unmap routine, and actually at the point of an XtDisplay call,
    which must happen in the background as part of an XtMapWidget function.
    Anyway, after 2-3 days fiddling, i gave up and did it in C.
    its much less elegant in my opinion, and I also lose the benefit of deriving
    pushbuttons from UIComponent and other things I've become accustomed to.

    anyone out there make a guess as to why this wouldnt work? I had the C
    hooked into the C++ no problem, as my constructino and Init methods were
    fine, as was the initial "managing" of the widget to screen. It was
    subsequent calls, to hide/show widgets, done via callbacks, that caused the
    coredump from XtMapWidget->XtDisplay.

    I'd love to fix it up... unfortuneately, I cant find anyone with enough
    knowledge of X, C and C++, with the greenhills compiler to tell me whats
    wrong. google came up empty when i looked, this is rare.

    regards
    Aaron



  2. Re: XWindows, ADA and C/C++

    Newsgroup User wrote:

    > I'd love to fix it up... unfortuneately, I cant find anyone with enough
    > knowledge of X, C and C++, with the greenhills compiler to tell me whats
    > wrong. google came up empty when i looked, this is rare.


    It's hard to tell without looking at the code. Do you try to reference
    0x0?

    But why don't you use any of the aavailable Ada bindings to X/Motif?

    -Frode

    --
    ^ Frode TennebÝ | email: Frode.Tennebo@ericsson.com ^
    | Ericsson AS., N-1788 Halden | Phone: +47 67 25 09 39 |
    | with Standard.Disclaimer; use Standard.Disclaimer; |

+ Reply to Thread