PtNumericFloat Bug?

Dear All,

I was having trouble with the following PtNumericFloat
resources not having any effect:

Pt_ARG_NUMERIC_INCREMENT
Pt_ARG_NUMERIC_MAX
Pt_ARG_NUMERIC_MIN
Pt_ARG_NUMERIC_VALUE

So I created a new application with a single
PtNumericFloat widget and nothing else.

I set the resources using the resources editor:

Pt_ARG_NUMERIC_INCREMENT = 0.01
Pt_ARG_NUMERIC_MAX = 10
Pt_ARG_NUMERIC_MIN = -10
Pt_ARG_NUMERIC_VALUE = 1

The widget displayed
an initial value of 0.00 and the increment was 1 and the
min and max settings had no effect.

I’m using PhAB 2.01.

I would really appreciate it if someone built the same single widget application I did and tried the above resource settings.

Thanks.

I tried it and got the same problem. The interesting thing is that it if you
test it using the “Test” option from the menu, it works as it should.
It doesn’t seem to matter what value you put either.
Quite strange.
Sylvain

Kevin P. Ladenheim <Kevin.Ladenheim@jhuapl.edu> wrote in message
news:Voyager.010309133428.12087331B@a2c-kpl.jhuapl.edu

Dear All,

I was having trouble with the following PtNumericFloat
resources not having any effect:

Pt_ARG_NUMERIC_INCREMENT
Pt_ARG_NUMERIC_MAX
Pt_ARG_NUMERIC_MIN
Pt_ARG_NUMERIC_VALUE

So I created a new application with a single
PtNumericFloat widget and nothing else.

I set the resources using the resources editor:

Pt_ARG_NUMERIC_INCREMENT = 0.01
Pt_ARG_NUMERIC_MAX = 10
Pt_ARG_NUMERIC_MIN = -10
Pt_ARG_NUMERIC_VALUE = 1

The widget displayed
an initial value of 0.00 and the increment was 1 and the
min and max settings had no effect.

I’m using PhAB 2.01.

I would really appreciate it if someone built the same single widget
application I did and tried the above resource settings.

Thanks.

Previously, Sylvain Marcotte wrote in qdn.public.qnxrtp.photon:

I tried it and got the same problem. The interesting thing is that it if you
test it using the “Test” option from the menu, it works as it should.
It doesn’t seem to matter what value you put either.
Quite strange.
Sylvain

I hadn’t noticed the test function - The resources worked properly for me in test mode also. The next thing to try is directly setting the resources in code. Thanks for the confirmation.

Kevin

I hadn’t noticed the test function - The resources worked properly for me in test mode also. The next thing to try is directly setting the resources in code. Thanks for the confirmation.

I was able to successfully set:

Pt_ARG_NUMERIC_INCREMENT
Pt_ARG_NUMERIC_MAX
Pt_ARG_NUMERIC_MIN
Pt_ARG_NUMERIC_VALUE

directly using PtSetResource().

I noticed another problem: I can set
the field width of a PtNumericFloat Widget in PhAB and it tests fine but when I compile and run, the float widget has the default field width. Any idea what the name of resource is for widget field width?

The PtNumericFloat widget has some problems. I wonder if QSSL people are reading these groups for bug reports or if I should submit a bug report?

I noticed another problem: I can set
the field width of a PtNumericFloat Widget in PhAB and it tests fine >but when I compile and run, the float widget has the default field >width. Any idea what the name of resource is for widget field width?

I should clarify: setting the field width smaller than the PhAB default has no effect when the application runs. Setting the field width wider than the PhAB default does work.

Hi!

I was able to successfully set:

Pt_ARG_NUMERIC_INCREMENT
Pt_ARG_NUMERIC_MAX
Pt_ARG_NUMERIC_MIN
Pt_ARG_NUMERIC_VALUE

directly using PtSetResource().

Does this mean that now if I want to have PtNumericFloats that are born
with certain values in them already, I have to use PtSetResource() in
callbacks that listen to the realized event?

thanks,
sanjeev - a qnx rookie