[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: JS Breakage (was Re: Auto-proxy problem)
From: Harri Porten <porten () trolltech ! com>
Date: 2001-05-29 15:07:31
[Download RAW message or body]
On Tue, 29 May 2001, Malte Starostik wrote:
> Sorry, that doesn't do it. The error message is
> JS: Reference error. Can't find variable: FindProxyForURL
That means that the interpreter wasn't able to resolve the
'FindProxyForURL' name. Give it a try with the full name, i.e.
ProxyConfig.FindProxyForURL().
> which happens when I do
>
> QString code = QString("return FindProxyForURL('%1', '%2');").arg(url.url())
> if (!m_kjs->evaluate(code.local8Bit()))
>
> although the previous initialization succeeded:
>
> m_kjs->evaluate(m_downloader->data())
>
> with m_downloader containing the script. I tried with something simple to
> avoid any errors about not finding the functions defined by KProxyBindings:
>
> function FindProxyForURL(url, host)
> {
> return "PROXY www-proxy.t-online.de:80";
> }
>
> I remember last time it didn't work, I had to change
> "FindProxyForURL('%1', '%2');" to "return FindProxyForURL('%1', '%2');",
> maybe now the complete function gets lost? Sorry, I don't know about KJS
> internals, mainly used khtml/ecma as a starting point. Do I need to tell it
> explicitly not to clean up something here?
That's only related to the returned value. The above error indicates that
the interpreter didn't even get that far.
Harri.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic