Re: JavaScript vs VB Script in Microsoft Scripting engines
rossenbg_at_hotmail.com
Date: 11/01/04
- Next message: Muhammad Aftab Alam: "Re: Toolbar for Windows Explorer"
- Previous message: rossenbg_at_hotmail.com: "JavaScript vs VB Script in Microsoft Scripting engines"
- In reply to: rossenbg_at_hotmail.com: "JavaScript vs VB Script in Microsoft Scripting engines"
- Next in thread: Igor Tandetnik: "Re: JavaScript vs VB Script in Microsoft Scripting engines"
- Reply: Igor Tandetnik: "Re: JavaScript vs VB Script in Microsoft Scripting engines"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 01 Nov 2004 07:40:15 +0200
Doh,
I have found the problem. The real name I have gave to my "someobject" was
actually "arguments" which is a object in the Standart JavaScript
language. And thus running code outside function used my object, but
running it inside function uses JavaScript one.
Does anyone knows why is this? I know that I have made BIG mistake, but I
would like to know why different objects are accessed depending where in
the JavaScript code they are used?
Cheers
On Mon, 01 Nov 2004 06:43:51 +0200, <rossenbg@hotmail.com> wrote:
>
> Hi all,
>
> I have had recently strange behaviour using JavaScript and VBScript
> engines, provided with Micorsoft Windows. It appears that when JS
> scripting engine is used, working with objects, inside JS functions,
> does not work. For example parsing code like:
>
> function some()
> {
> var cnt = someobject.count;
> ...
> }
> some();
>
> will give me an error, because inside the function the result returned
> by "someobject.count" is invalid ( VT_EMPTY ). I've debug the
> application and "propget" for "count" is never called. But if I parse
> only this:
>
> var cnt = someobject.count;
>
> then everything is just fine. In VisualBasic all the cases are OK. Do
> any of you had such behaviour using MS JavaScript and how this was
> solved?
>
> Cheers
>
-- Rossen Tzonev Sofia, Bulgaria
- Next message: Muhammad Aftab Alam: "Re: Toolbar for Windows Explorer"
- Previous message: rossenbg_at_hotmail.com: "JavaScript vs VB Script in Microsoft Scripting engines"
- In reply to: rossenbg_at_hotmail.com: "JavaScript vs VB Script in Microsoft Scripting engines"
- Next in thread: Igor Tandetnik: "Re: JavaScript vs VB Script in Microsoft Scripting engines"
- Reply: Igor Tandetnik: "Re: JavaScript vs VB Script in Microsoft Scripting engines"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|