Combo Box Question

I want to get the value of the currently selected combo box item.

I am currently trying:
long * month;
PtGetResource( ABW_calib_edit_month, Pt_ARG_CBOX_SEL_ITEM, &month, 0 );
printf( “month=%d\n”, *month );

But the number that prints is very large. I am expecting 0 to 11.
What is the proper procedure to get the Pt_ARG_CBOX_SEL_ITEM for a
combo box?

Wojtek Lerch <Wojtek_L@yahoo.ca> wrote:
WL > Bill Caroselli wrote:

I want to get the value of the currently selected combo box item.

I am currently trying:
long * month;
PtGetResource( ABW_calib_edit_month, Pt_ARG_CBOX_SEL_ITEM, &month, 0 );
printf( “month=%d\n”, *month );

But the number that prints is very large. I am expecting 0 to 11.
What is the proper procedure to get the Pt_ARG_CBOX_SEL_ITEM for a
combo box?

WL > Pt_ARG_CBOX_SEL_ITEM is an unsigned short, not a long.

blush!

It does say that, doesn’t it!

Thanks

Bill Caroselli wrote:

I want to get the value of the currently selected combo box item.

I am currently trying:
long * month;
PtGetResource( ABW_calib_edit_month, Pt_ARG_CBOX_SEL_ITEM, &month, 0 );
printf( “month=%d\n”, *month );

But the number that prints is very large. I am expecting 0 to 11.
What is the proper procedure to get the Pt_ARG_CBOX_SEL_ITEM for a
combo box?

Pt_ARG_CBOX_SEL_ITEM is an unsigned short, not a long.

How about a strongly typed C++ interface for Photon? The
code output by PhAB will compile with C++. We compile
everything with C++ and it works fine. So this could
be done without modifying PhAB. Just give us C++ people
a typesafe interface file to include.

John Nagle
Team Overbot

Bill Caroselli wrote:

Wojtek Lerch <> Wojtek_L@yahoo.ca> > wrote:
WL > Bill Caroselli wrote:

I want to get the value of the currently selected combo box item.

I am currently trying:
long * month;
PtGetResource( ABW_calib_edit_month, Pt_ARG_CBOX_SEL_ITEM, &month, 0 );
printf( “month=%d\n”, *month );

But the number that prints is very large. I am expecting 0 to 11.
What is the proper procedure to get the Pt_ARG_CBOX_SEL_ITEM for a
combo box?


WL > Pt_ARG_CBOX_SEL_ITEM is an unsigned short, not a long.

blush!

It does say that, doesn’t it!

Thanks

John Nagle <nagle@downside.com> wrote:
JN > How about a strongly typed C++ interface for Photon? The
JN > code output by PhAB will compile with C++. We compile
JN > everything with C++ and it works fine. So this could
JN > be done without modifying PhAB. Just give us C++ people
JN > a typesafe interface file to include.

JN > John Nagle
JN > Team Overbot

I second the motion.

This reminds me of an old story from way out in left field.

Ages ago, Borland’s Phillie Kahn (sp?) came out with their first C++
compiler. Phillie made a statement that C++ was undoubtedly the way to
program for the future and that all Borland products from then on would
be written in C++.

Round about the same time Billy Gates also made a public statement,
something to the effect that C++ was just another of the latest software
fads and that Microsoft wasn’t going to bother to persue it.

About 5 years later Microsoft decided that all of their future software
projects would be written in C++.

Somewhere around 12 years ago Dan Dodge made a statement that C++ was
just too inefficient for the QSSL to bother spending any development
efforts in C++.

Even so, I’d put any application written using the Watcom C++ compiler
up against the same application written for and compiled by the GNU C
compiler.

I think it would be prudent for QSSL to realize that C++ is here to stay
and that customers, including their big automotive customers, are in
fact using it. C++ has already stood the test of time.

Also, QSSL needs to do somethnig about getting a real commercial compiler
for QNX. Once upon a time the QNX OS would blow the doors off of a
similar application written for MicroSlob even if the MS version were
running on a computer that was twice as fast. Now it is only a little
faster when run in the same environment.

Congradulations! QSSL wanted to catch up to Microsoft.
Well, your almost there.