PtPanelGroup question

If I call
uint16_t * index;
PtGetResource( widget, Pt_ARG_CURRENT_INDEX, &index, 0 );
in a Realize callback I get the correct index.

If I make the same call in a PanelSwitching callback, the index
returned is the index of what the panel used to be.

Why?


Bill Caroselli – Q-TPS Consulting
1-(708) 308-4956 <== Note: New Number
qtps@earthlink.net

Take a look at the Helpviewer docs for PtPanelGroup, under the
Pt_CB_PG_PANEL_SWITCHING resource.

When you’re inside this callback, you can get at the PtPanelGroupCallback_t
structure from the cbdata. The ‘new_panel_index’ is what you’re looking
for.

The reason that Pt_ARG_CURRENT_INDEX still has the old value is because this
callback is generated before the panel is actually switched. Returning a
value other than Pt_CONTINUE will prevent the switch from taking place.


“Bill Caroselli” <qtps@earthlink.net> wrote in message
news:bknbpg$dil$1@inn.qnx.com

If I call
uint16_t * index;
PtGetResource( widget, Pt_ARG_CURRENT_INDEX, &index, 0 );
in a Realize callback I get the correct index.

If I make the same call in a PanelSwitching callback, the index
returned is the index of what the panel used to be.

Why?


Bill Caroselli – Q-TPS Consulting
1-(708) 308-4956 <== Note: New Number
qtps@earthlink.net