I am developing an application where I create a series of “PtNumericInteger”
widgets that will be selected by the user and once this is done, either an
onscreen keypad (touchscreen system no keyboard) or through another means of
input, numeric changes are made.
Under 6.2 I have the application running where I can, with the mouse, select
a widget and fall through a Pt_CB_GOT_FOCUS callback that allows entry via
the onscreen keypad. Seems to work.
Moved down to 6.1 ( test units are still under 6.1 and won’t change until
after Jan 1 ), rebuilt program, and the callback attached to GOT_FOCUS is
never envoked under the same conditions, i.e.mouse click.
Is there a difference??? Is this something “fixed” in 6.2??? Is there
something I missed…
The following code sinpet should give an idea where I am going with this…
There will be a variable number of Pt_NumericInteger widgets created
depending on hardware configuration… thus the requirement to create these
guys at runtime dynamically.
Migration to 6.2 on the target system is possible, only if a 6.1 solution is
“im-possible”.
PtSetArg( &args[ArCt++], Pt_ARG_POS, &TxtBoxPos, 0 );
PtSetArg( &args[ArCt++], Pt_ARG_DIM, &TxtBoxDim, 0 );
PtSetArg( &args[ArCt++], Pt_ARG_NUMERIC_MIN, 0, 0 );
PtSetArg( &args[ArCt++], Pt_ARG_NUMERIC_MAX, MaxValue, 0 );
PtSetArg( &args[ArCt++], Pt_ARG_NUMERIC_VALUE, Value, 0 );
PtSetArg( &args[ArCt++], Pt_ARG_USER_DATA, &EntryWgt[g].WgtNumber,
sizeof(int));
PtSetArg( &args[ArCt++], Pt_ARG_NUMERIC_FLAGS, Pt_FALSE,
Pt_NUMERIC_ENABLE_UPDOWN | Pt_NUMERIC_WRAP );
PtSetArg( &args[ArCt++], Pt_ARG_FLAGS, Pt_SELECTABLE | Pt_SET |
Pt_FOCUS_RENDER, Pt_SELECTABLE | Pt_SET | Pt_FOCUS_RENDER );
EntryWgt[g].TxtWidget = PtCreateWidget( PtNumericInteger, ABW_pneSetup_gset,
ArCt, args );
PtAddCallback( EntryWgt[g].TxtWidget, Pt_CB_NUMERIC_CHANGED,
gsetup::ChangedCallback, NULL );
PtAddFilterCallback( EntryWgt[g].TxtWidget, Ph_EV_KEY, snag_key_event,
NULL );
PtAddCallback( EntryWgt[g].TxtWidget, Pt_CB_GOT_FOCUS, WidgetGotFocus,
NULL );
PtRealizeWidget( EntryWgt[g].LblWidget );
PtRealizeWidget( EntryWgt[g].TxtWidget );
Any assistance???
V Bednarz
Nordson Corp