Is ApGetWidgetPtr() function available ( working fine ) for widgets in
In my application there’re 2 panes with optional picture modules so I
cannot use ABW_* manifest. I decided to use ApGetWidgetPtr() function to
access widgets in single pane. I’ve created PtPane widget, change pane
button and exit button in base window, 3 PtLabel widgets in picture module.
Callback for inserting picture module into pane was easy:
PtClearWidget( ABW_pane1 );
ApCreateModule( ABW_pane1, ABM_pict1, cbinfo );
PteRealizeWidget( ABW_pane1 );
And this is my setup function:
setup_pane1( PtWidget_t *link_instance, ApInfo_t *apinfo, PtCallbackInfo_t
w = ApGetWidgetPtr( link_instance, ABW_string1 );
PtSetArg( w, Pt_ARG_FILL_COLOR, Pg_RED, 0 );
PtSetResources( w, 1, args );
And here problem arised. When ABN_ of widget was equal to ABN_ of pane,
fill color had changed for pane1 and not for widget! Changing fill color for
remaining widgets in picture module was without problem. When I changed
widget ordering in base window, problem had appeared with relevant widget in
pane. By using ABW_ manifest I accessed to the right widget.
This problem is very easy to reproduse… One base window, one picture
module and setup function for this module.
Can anybody help me? I need to use function ApGetWidgetPtr(), but this
technique doesn’t work. ( I don’t want to save ABW_ for each pane )