Motif: scale widget Problem

D

Daniel Tscharnuter

Hello!

First of all, I am new to C++.

The problem with the scale widget is that I get a segmentation fault when I
want to create it with more than zero decimal numbers.

beta_scale_ = XtVaCreateManagedWidget("betascale",
xmScaleWidgetClass, form_left,
XmNtitleString, title,
XmNorientation, XmHORIZONTAL,
XmNminimum, 1,
XmNmaximum, 10000,
XmNdecimalPoints, 2,
XmNshowValue, True,
XmNvalue, 100,
XmNwidth, SCALE_WIDTH,
XmNheight, SCALE_HEIGHT,
NULL);

It worked that way in C, but in C++ it only works with XmNdecimalPoints set
to 0.

Thanks,
Daniel
 
V

Victor Bazarov

Daniel Tscharnuter said:
First of all, I am new to C++.

Your problem while shows up in C++ really has nothing to do with C++
but rather with Motif and its widgets.
The problem with the scale widget is that I get a segmentation fault when I
want to create it with more than zero decimal numbers.

beta_scale_ = XtVaCreateManagedWidget("betascale",
xmScaleWidgetClass, form_left,
XmNtitleString, title,
XmNorientation, XmHORIZONTAL,
XmNminimum, 1,
XmNmaximum, 10000,
XmNdecimalPoints, 2,
XmNshowValue, True,
XmNvalue, 100,
XmNwidth, SCALE_WIDTH,
XmNheight, SCALE_HEIGHT,
NULL);

It worked that way in C, but in C++ it only works with XmNdecimalPoints set
to 0.

You need to ask about it in a newsgroup dedicated to Motif. This NG only
deals with C++ _language_ issues, and yours isn't one of them.

Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top