Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #29754
| From | emf <emfril@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Slint has changed |
| Date | 2016-03-01 22:19 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <nb5m33$hqr$1@gioia.aioe.org> (permalink) |
| References | <nb2gc9$17gs$1@gioia.aioe.org> |
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
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
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
csiph-web