[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Slint has changed

emf

2/29/2016 10:23:00 PM

I visited again slint to check my new webpage under construction
(http://emf.neocities.org/tmp/eyeExer...) and found some changes:

1. In the line (and another one)

w = window.screen.width - d - e;

it says "Undeclared 'window'." How do you declare the current window?

2. In the line

alert("START");

it says "Undeclared 'alert'". How do you declare an alert?

3. Unless you check Tolerate... multiple vars, it complains about the
single line declarations of variables. What is the expected declaration
now according to slint?

4. I also observed that I had to format

j = (i + rnd < 4)
? i + rnd
: i + rnd - 4;

in 3 lines instead of 1. When did this change? It wasn't like that
before, right?

This eye exercize is intended to be used on full screen. I am not sure
whether it works properly on different iize screens than mine...

Thanks.

emf

--
It ain't THAT, babe! - A radical reinterpretation
http://emf.neocities.org/bd/itaintm...
1 Answer

emf

3/2/2016 3:19:00 AM

0

On 2016-02-29 17:23, emf wrote:
> I visited again slint to check my new webpage under construction
> (http://emf.neocities.org/tmp/eyeExer...) and found some changes:
>
> 1. In the line (and another one)
>
> w = window.screen.width - d - e;
>
> it says "Undeclared 'window'." How do you declare the current window?
>
> 2. In the line
>
> alert("START");
>
> it says "Undeclared 'alert'". How do you declare an alert?


OK, the jslint 1 and 2 warnings can be avoided with

/* global, window, alert */

Is this proper for jslint only?

> 3. Unless you check Tolerate... multiple vars, it complains about the
> single line declarations of variables. What is the expected declaration
> now according to slint?

I put each declaration in a different line, since that is considered
proper by jslint...
>
> 4. I also observed that I had to format
>
> j = (i + rnd < 4)
> ? i + rnd
> : i + rnd - 4;
>
> in 3 lines instead of 1. When did this change? It wasn't like that
> before, right?
>
> This eye exercize is intended to be used on full screen. I am not sure
> whether it works properly on different iize screens than mine...

With a little addition, I now think it should work on any screen, but I
would like to have confirmation on this:

And something else: there are some variables that are used in only 1
function (moveAround()). Since, however, this function is used
repeatedly to move the ball, I opted to make these variables global
instead of local, so they don't have to be declared repeatedly and slow
down the execution. I would appreciate some comment on this too.

I hope this post is more specific than my first one and will elicit some
answer...

emf

--
Spherical Triangle Calculator
http://emf.neocities.org/tr/sphe...