Page 1 of 1

visual effect not working (it used to in the 80 th HyperScript)

Posted: Mon Feb 25, 2019 4:17 pm
by Paul-Luc
This problem seems quite simple, but I can't find the solution.

I wrote this script :

on openCard
unlock screen
show image "Bulle 1" visual effect "wipe" right very slow
show fld "Parole 1" visual effect "wipe" right very slow
end openCard

These 2 objets (hidden before) are normally shown but without any effect.

Can you please explain me why the visual effect doesn't work ?

Sorry for my poor english and maybe the bad place to post this topic. I'am a new user - not used to the forums, even in French

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Mon Feb 25, 2019 4:46 pm
by AndyP
No problem understanding you.

you need to change this

Code: Select all

show image "Bulle 1" visual effect "wipe" right very slow
to

Code: Select all

show image "Bulle 1" with visual effect "wipe" right very slow
I just tried this and it needs the "with" to work correctly.

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Mon Feb 25, 2019 4:47 pm
by dunbarx
Hi.

Your English is fine.

You just forgot a word ("with") to make the syntax correct:

Code: Select all

show image "Bulle 1" WITH visual effect "wipe" right very slow
Craig Newman

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Mon Feb 25, 2019 4:53 pm
by dunbarx
@ Andy.

Odd that omissions like this simply fail to work, but do not throw an error at compile time. LC seems far more lenient, or rather lazy, in this regard than HC ever was. I wish the engine complained more than it does. It would make debugging easier, which may have thrown the OP; he got no feedback at all about the impending failure to work correctly. LC knew it would not work, it just wasn't saying anything about it.

This issue revolves around missing, but required, keywords. On the other side of that coin, LC will tolerate extraneous words here and there and proceed just fine. I am not sure which is more annoying :wink:

Craig

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Mon Feb 25, 2019 6:11 pm
by FourthWorld
dunbarx wrote:
Mon Feb 25, 2019 4:53 pm
Odd that omissions like this simply fail to work, but do not throw an error at compile time. LC seems far more lenient, or rather lazy, in this regard than HC ever was. I wish the engine complained more than it does. It would make debugging easier, which may have thrown the OP; he got no feedback at all about the impending failure to work correctly. LC knew it would not work, it just wasn't saying anything about it.
Is that syntax error flagged in HyperCard?

I agree, of course, that the more thorough error-checking is the better the experience for everyone. Apple had a few advantages LC doesn't: millions of testers (HC was bundled with every Mac), and less than 1/4th the number language tokens (single platform, fewer object types, etc.).

An interpreter can catch many things during compilation, but there will be edge cases dealing with specific combinations of language elements that will inevitably fall through the cracks. I've never seen an interpreter yet that doesn't share this common weakness.

When we consider the combinatorial explosion of possibilities for combining language elements, it's pretty amazing that any interpreter can catch as much as it can. But xTalks are notorious for not being designed for compilation, so the level of effort needed to move as much as possible from compile-time to execution is not trivial.

That said, once a combination is found that falls through the cracks, a bug report is usually all that's needed to have that error-check added to the compiler.

Has this one been reported?

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Mon Feb 25, 2019 6:34 pm
by dunbarx
Richard.

Well explained. I will mention this to QCC and see if they panic.

Craig

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Mon Feb 25, 2019 7:28 pm
by bogs
I'll save some time and panic for them!
ImageImageImage

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Mon Feb 25, 2019 9:15 pm
by dunbarx
Filed # 21853

Don't panic.

Craig

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Mon Feb 25, 2019 9:58 pm
by bogs
OK.
(Phwew)

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Tue Feb 26, 2019 10:08 am
by AndyP
Panic later, when the panics over!
You'll have more time to enjoy it :wink:

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Tue Feb 26, 2019 12:08 pm
by bogs
I definitely need to drink more coffee, that 40 cups a day ain't cutting it :P

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Tue Feb 26, 2019 3:21 pm
by dunbarx
Panos confirmed what Richard spoke about, that the parser oftentimes will "read" a line of code, and if that line begins with a valid LC statement, it may well ignore anything that follows. This is not a science.

We have all seen trailing oddities that seem to be ignored by the parser, for better or worse.

Craig

Re: visual effect not working (it used to in the 80 th HyperScript)

Posted: Tue Feb 26, 2019 5:50 pm
by jacque
I'll just add that the quotes around "wipe" aren't needed either. Things must have changed since I was warned not to quote any visual effects, apparently it no longer throws an error.