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
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.