Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #29737 > unrolled thread

Slint has changed

Started byemf <emfril@gmail.com>
First post2016-02-29 17:23 -0500
Last post2016-03-01 22:19 -0500
Articles 2 — 1 participant

Back to article view | Back to comp.lang.javascript


Contents

  Slint has changed emf <emfril@gmail.com> - 2016-02-29 17:23 -0500
    Re: Slint has changed emf <emfril@gmail.com> - 2016-03-01 22:19 -0500

#29737 — Slint has changed

Fromemf <emfril@gmail.com>
Date2016-02-29 17:23 -0500
SubjectSlint has changed
Message-ID<nb2gc9$17gs$1@gioia.aioe.org>
I visited again slint to check my new webpage under construction 
(http://emf.neocities.org/tmp/eyeExercise1.html) 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/itaintmebabe.html

[toc] | [next] | [standalone]


#29754

Fromemf <emfril@gmail.com>
Date2016-03-01 22:19 -0500
Message-ID<nb5m33$hqr$1@gioia.aioe.org>
In reply to#29737
On 2016-02-29 17:23, emf wrote:
> I visited again slint to check my new webpage under construction
> (http://emf.neocities.org/tmp/eyeExercise1.html) 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/spherical.html

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web