Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I am able to retrieve an HTML page, but can not get to any links from that page. I have configured the HVN_JUMP case in my notify function to call IWeb_GetResponse with the new URL, and it is trying to retrieve it. It even calls the callback function specified in IWeb_GetResponse, but WEB_ERROR_MAP tells me that Im getting the following error:

#define WEB_ERROR_UNSUPSCHEME (WEB_ERROR_BASE+5) /* unsupported scheme, no handler found */

And it never puts up the new page. Anyone know what this means?

I am able to hit an HTML page, go back to a menu, and then back to an HTML page. I just can't go HTML->HTML directly. I am creating a new instance of my HTMLViewer and am also cleaning up after my web session:

void WebCleanup( mFan * pMe)
{
CALLBACK_Cancel(&pMe->m_Callback);

if (pMe->m_pIWebResp)
{
IWEBRESP_Release(pMe->m_pIWebResp);
pMe->m_pIWebResp = NULL;
}

if (pMe->m_pIWeb)
{
IWEB_Release(pMe->m_pIWeb);
pMe->m_pIWeb = NULL;
}

if (pMe->m_BodyBuffer)
{
FREE(pMe->m_BodyBuffer);
pMe->m_BodyBuffer = NULL;
}
pMe->m_BodySize = 0;
pMe->m_BodyAllocSize = 0;

Any ideas?

Thanks

You have to copy the URL passed to your HtmlViewer notify function. The pointer in the HViewJump is only good while in your PFNHVIEWNOTIFY.
From AEEWeb.h:
Function: IWEB_GetResponse()
Description:
kick off a web transaction
Prototype:
void IWEB_GetResponse(IWeb *po, IWebResp **ppiwresp,
AEECallback *pcb, const char *cpszUrl, ...);
Parameters:
IWeb *po: the interface pointer
IWebResp **ppiwresp: pointer to IWebResp interface pointer, where to stick
answer
AEECallback *pcb: where to call when answer is ready
const char *cpszUrl: requested document, this pointer must stay valid
until the above AEECallback fires, cpszUrl is not copied
... : a variable list of WebOpt id/value pairs, terminated with WEBOPT_END

You have to copy the URL passed to your HtmlViewer notify function. The pointer in the HViewJump is only good while in your PFNHVIEWNOTIFY.
From AEEWeb.h:
Function: IWEB_GetResponse()
Description:
kick off a web transaction
Prototype:
void IWEB_GetResponse(IWeb *po, IWebResp **ppiwresp,
AEECallback *pcb, const char *cpszUrl, ...);
Parameters:
IWeb *po: the interface pointer
IWebResp **ppiwresp: pointer to IWebResp interface pointer, where to stick
answer
AEECallback *pcb: where to call when answer is ready
const char *cpszUrl: requested document, this pointer must stay valid
until the above AEECallback fires, cpszUrl is not copied
... : a variable list of WebOpt id/value pairs, terminated with WEBOPT_END

Hi ,
I also Got Same error WEB_ERROR_UNSUPSCHEME
Can u say what u mean by "Not Copied"
Can't v use the url allocated with MALLOC() and copied with STRCPY() from another string ?
Thanx in advance
Sakthi

Hi ,
I also Got Same error WEB_ERROR_UNSUPSCHEME
Can u say what u mean by "Not Copied"
Can't v use the url allocated with MALLOC() and copied with STRCPY() from another string ?
Thanx in advance
Sakthi

Actually, it's the IWEB documentation that says "not copied".
What it means is that the buffer passed as a URL to IWEB_GetResponse() must not be freed until the response AEECallback fires.
Where I've seen this error before, a stack buffer was being used as the buffer for the URL.

Actually, it's the IWEB documentation that says "not copied".
What it means is that the buffer passed as a URL to IWEB_GetResponse() must not be freed until the response AEECallback fires.
Where I've seen this error before, a stack buffer was being used as the buffer for the URL.

Hi rWalker,
thanx for ur reply
I debugged the application by checking whether addressURL is alive or not till callback
I did this with STRLEN(addressURL)
this is giving corrcet number of characters before IWEB_Response and even in CallBack function also
Any idea what might be the wrong ??
Sakthi

Hi rWalker,
thanx for ur reply
I debugged the application by checking whether addressURL is alive or not till callback
I did this with STRLEN(addressURL)
this is giving corrcet number of characters before IWEB_Response and even in CallBack function also
Any idea what might be the wrong ??
Sakthi

Hi rWalker ,
Hey ! I resolved the problem
Actually even though addressURL is alive the addressURL is not correct
means it started with "one space "
During debugging i could n't realize until now
Thanx for spending ur valuable time to look in this issue
Sakthi

Hi rWalker ,
Hey ! I resolved the problem
Actually even though addressURL is alive the addressURL is not correct
means it started with "one space "
During debugging i could n't realize until now
Thanx for spending ur valuable time to look in this issue
Sakthi