Moderators: e_phoenix13
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
Hey Guys,

I don't know what happens, but my javascript functions stopped to work on this new firefox release. Does anyone else had the same problem? Is it a firefox issue or a VMP issue?

Thanks,
Marcelo Muniz
 
Posts: 28 | Registered: May 25, 2005Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Admin
Posted Hide Post
Marcelo,

Which version of the VMP are you using?
 
Posts: 1188 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
Junior Member
Posted Hide Post
i see this bug in VMP 3.3 In FireFox 1.0.7 all function work but in FF1.5 not
 
Posts: 3 | Registered: December 06, 2005Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
I found the bug. I'm using the latest VMP.

when I run the following javascript line:

var loc = vmp.GetProperty('MTSInstance.Wheel_FrontLeft', 'loc_', 'mts_pnt3d');

I receive the following string: "n,nnnn n,nnnnn n,nnnn" where n is a number. The problem is that now the decimal divisor is ',' instead of '.'. If I run the same javascript line on the older firefox or IE it returns me "n.nnnn n.nnnnn n.nnnn"

As I need to do math operations if the numbers, and the decimal divisor is wrong it crashes my application.

It seems that the new firefox 1.5 plugin communication gets regional setting for decimal divisor. I'm from Brazil and in portugues we use ',' as decimal divisor.

I've already posted this bug at bugzilla.mozilla.org at firefox bugs too.

Please fix this. It crashes all viewpoint javascript programs.
 
Posts: 28 | Registered: May 25, 2005Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
Bugzilla link:

https://bugzilla.mozilla.org/show_bug.cgi?id=319318

What do the viewpoint developers say about this?
 
Posts: 28 | Registered: May 25, 2005Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Admin
Posted Hide Post
Marcelo,

What version of MTS3Interface.js are you using? I believe scripting issues for Firefox has been addressed with the latest version (5.00.01.03) which can be downloaded from Dev Central under "New Web Installer / MTS3Interface". Please let me know if this solves the issue.

This message has been edited. Last edited by: Admin,
 
Posts: 1188 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
I'm using the latest MTS3Interface.js (version 5.00.01.03).

And it keeps the error. To solve it I needed to create an auxiliary function to replace "," by ".".

function replaceAll( str, from, to ) {
    var idx = str.indexOf( from );


    while ( idx > -1 ) {
        str = str.replace( from, to );
        idx = str.indexOf( from );
    }

    return str;
}


	var loc = vmp.GetProperty('MTSInstance.Wheel_FrontLeft', 'loc_', 'mts_pnt3d');
	loc = replaceAll(loc,",",".");
	vmp.SetProperty('MTSInstance.wheel_01', 'loc_',loc, 'mts_pnt3d');
	


But it's a shame as I don't need to use this code this on Internet Explorer.

Frown
 
Posts: 28 | Registered: May 25, 2005Reply With QuoteEdit or Delete MessageReport This Post
tao
Member
Posted Hide Post
There is another annoying problem about this bug.
I don't think there is a workaround for this one.

I was playing with svg in mtx code.

I could not understand why a basic shape (rect) with opacity was not working.

Without opacity everything is ok, but when i set 'fill-opacity: 0.5' nothing appears on the screen.

The problem is the same (with FF1.5 and W2K).
On FF 1.07 everything is fine.

I'm french, and we also use ',' as decimal separator.

For the 'fill-opacity' attribute, if i replace '0.5' by '0,5' i get transparency on my rect.

It seems the way you get attribute's values from a 'style' attribute is bad.

If in windows i set '.' as decimal separator my code with '0.5' works good in FF 1.5...

Are you aware of this bug ?

For this one i think it's more a VPT bug than a FF bug.

You consider the '.' character as the decimal separator for your mtx parser and vetscript code. You should do the same when parsing svg code.

Regards,
Lionel

PS: Sample code taken from 'vmp 3.12 release notes' pdf file

[MTSTimeElem Type="SWFView" Name="barry" On="1" ]
[svg width="512" height="512" ]
[rect x="50" y="70" width="335" height="320" style="fill: blue; fill-opacity: 0.5; stroke: green; stroke-width: 2" /]
[/svg]
[/MTSTimeElem]
 
Posts: 19 | Registered: January 24, 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Picture of Admin
Posted Hide Post
Yes, this is a problem exposed by FFox_1.5’s way of treating locale info.

Most likely it’s local for SVG.

This will be fixed in next VMP release (no solid time yet).

For now the workaround (ugly one) would be to have different content for FFox_1.5 + French on client’s machine.

Regards,
Viewpoint Support
 
Posts: 1188 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community