Skip navigation.
The QNX Community Portal

View topic - Web error handling using Pt_CB_WEB_ERROR

Web error handling using Pt_CB_WEB_ERROR

Isn't the name clear?

Web error handling using Pt_CB_WEB_ERROR

Postby VincentOx » Tue May 05, 2009 9:49 am


In my application, I use the widget ptWebClient. This widget need to be set with a rendering server (vserver, mozserver, …). It also has a callback (Pt_CB_WEB_ERROR) called when a web error is met (e.g.: 404 error for example). Here is my problem: when the vserver rendering server is used, this web error callback is called, it works. However, when the mozserver is used, this callback is NEVER called. We use mozserver in our application and we need to catch web error.

The QNX ptWebClient manual page does not tell this callback is a vserver specific one.
Is there another way than this callback to catch them ?

Here is the code:
Code: Select all
// This method creates the web client (ptWebClient widget)
void createWebClient(PtWidget_t* container, PhDim_t dim, PhPoint_t pt, unsigned int idHandler)
   PtArg_t args[8];
   unsigned int nbArgs = 0;
   PtSetArg(&args[nbArgs++], Pt_ARG_DIM, &dim, 0);
   PtSetArg(&args[nbArgs++], Pt_ARG_POS, &pt, 0);
   PtSetArg(&args[nbArgs++], Pt_ARG_WEB_SERVER, "online", 0);
   PtSetArg(&args[nbArgs++], Pt_ARG_WEB_OPTION, "DISABLES_NONE", "fScriptDisables" );
   PtSetArg(&args[nbArgs++], Pt_CB_WEB_ERROR, &callbacks[1], 0);
   webClient = PtCreateWidget(PtWebClient, container, nbArgs, args);

//This is the callback normally called when a web error is met
int testCallbackWebClient(PtWidget_t *w, void *data,PtCallbackInfo_t *cbinfo)
   printf("WEB ERROR !\n");

This works with vserver but doesn’t with mozserver.

Any idea ?

New Member
Posts: 4
Joined: Tue May 05, 2009 9:07 am

Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 1 guest