IE7 object expected errors.

4 messages Options
Embed this post
Permalink
Tómas Guðmundsson

IE7 object expected errors.

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi all,

 

As you all can see it is definitely debugging time in Iceland-land. We here at Snertill have our own layer manager we use

to filter out other filters we don‘t want to query against. However, while it is working perfectly in Firefox (yes here we
go again), it does not work in Internet Explorer. It gives as usual vague explanations like "Object expected" or and
"Error: Expected identifier, string or number". Whilst debugging javascript with Visual Studio
J I found out it stoppes on
"this.layerMngr = new Fusion.Tool.SneLayerManager()" – so somehow this is causing problems in IE but not in Firefox.

 

Has anyone encountered this before with new-ing some other classes or creating objects of some javascript objects.

 

Maybe the term "Class" is not the same kind in general programming language like Java or C++ that I have yet to figure out

but if you guys could shed some light that would be great.

 

Regards,

Tómas.


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Mike Adair

Re: IE7 object expected errors.

Reply Threaded More More options
Print post
Permalink
Tomas,

That error in IE is almost always because of the extra comma problem.
You will need to check all your objects to make sure that the last
element added isn't followed by a comma. Note that this includes your
code for your custom class, eg.

myWidget = OpenLayers.Class(Fusion.Lib.Widget, {
initialize: function() {
},
lastFuncForMyWidget: function() {
} <-- a comma here will cause an error in IE
});

Same thing goes for any objects you define within your class.

Mike


Tómas Guðmundsson wrote:

>
> Hi all,
>
> As you all can see it is definitely debugging time in Iceland-land. We
> here at Snertill have our own layer manager we use
>
> to filter out other filters we don‘t want to query against. However,
> while it is working perfectly in Firefox (yes here we
> go again), it does not work in Internet Explorer. It gives as usual
> vague explanations like "Object expected" or and
> "Error: Expected identifier, string or number". Whilst debugging
> javascript with Visual Studio J I found out it stoppes on
> "this.layerMngr = new Fusion.Tool.SneLayerManager()" – so somehow this
> is causing problems in IE but not in Firefox.
>
> Has anyone encountered this before with new-ing some other classes or
> creating objects of some javascript objects.
>
> Maybe the term "Class" is not the same kind in general programming
> language like Java or C++ that I have yet to figure out
>
> but if you guys could shed some light that would be great.
>
> Regards,
>
> Tómas.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>  
_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Paul Spencer-2

Re: IE7 object expected errors.

Reply Threaded More More options
Print post
Permalink
In reply to this post by Tómas Guðmundsson
I would venture to guess that you have an extraneous comma in your  
widget class after the last method.  A handy tool for finding this  
kind of error is jslint (http://www.jslint.com/), I have it  
incorporated into my text editor (TextMate) to check javascript files  
when I save them and report errors and warnings - very handy.

Cheers

Paul

On 7-Aug-08, at 9:41 AM, Tómas Guðmundsson wrote:

> Hi all,
>
> As you all can see it is definitely debugging time in Iceland-land.  
> We here at Snertill have our own layer manager we use
> to filter out other filters we don‘t want to query against. However,  
> while it is working perfectly in Firefox (yes here we
> go again), it does not work in Internet Explorer. It gives as usual  
> vague explanations like "Object expected" or and
> "Error: Expected identifier, string or number". Whilst debugging  
> javascript with Visual Studio J I found out it stoppes on
> "this.layerMngr = new Fusion.Tool.SneLayerManager()" – so somehow  
> this is causing problems in IE but not in Firefox.
>
> Has anyone encountered this before with new-ing some other classes  
> or creating objects of some javascript objects.
>
> Maybe the term "Class" is not the same kind in general programming  
> language like Java or C++ that I have yet to figure out
> but if you guys could shed some light that would be great.
>
> Regards,
> Tómas.
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://www.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Tómas Guðmundsson

RE: IE7 object expected errors.

Reply Threaded More More options
Print post
Permalink
All.

My Google skills are fail. I should've looked through old logs in the fusion-users lists.

I think this has been discussed before, again by me. Forgetful programmars are faulty programmers :)

Thanks guys again. I will let you know though if still doesn't work.

Regards,
Tómas

-----Original Message-----
From: Paul Spencer [mailto:[hidden email]]
Sent: 7. ágúst 2008 14:25
To: Tómas Guðmundsson
Cc: [hidden email]
Subject: Re: [fusion-users] IE7 object expected errors.

I would venture to guess that you have an extraneous comma in your  
widget class after the last method.  A handy tool for finding this  
kind of error is jslint (http://www.jslint.com/), I have it  
incorporated into my text editor (TextMate) to check javascript files  
when I save them and report errors and warnings - very handy.

Cheers

Paul

On 7-Aug-08, at 9:41 AM, Tómas Guðmundsson wrote:

> Hi all,
>
> As you all can see it is definitely debugging time in Iceland-land.  
> We here at Snertill have our own layer manager we use
> to filter out other filters we don't want to query against. However,  
> while it is working perfectly in Firefox (yes here we
> go again), it does not work in Internet Explorer. It gives as usual  
> vague explanations like "Object expected" or and
> "Error: Expected identifier, string or number". Whilst debugging  
> javascript with Visual Studio J I found out it stoppes on
> "this.layerMngr = new Fusion.Tool.SneLayerManager()" - so somehow  
> this is causing problems in IE but not in Firefox.
>
> Has anyone encountered this before with new-ing some other classes  
> or creating objects of some javascript objects.
>
> Maybe the term "Class" is not the same kind in general programming  
> language like Java or C++ that I have yet to figure out
> but if you guys could shed some light that would be great.
>
> Regards,
> Tómas.
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://www.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users