LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
kpeters
- Posts: 112
- Joined: Wed Mar 21, 2007 9:32 pm
Post
by kpeters » Sun Jul 22, 2007 5:12 pm
In the documentation (and posts on the web) visual effects is used like this:
[/code]
In my world this yields an "unquoted literal" error....
Passing the effect as parameter works
[/code]
Can someone explain??
TIA,
Kai
Last edited by
kpeters on Sun Jul 22, 2007 5:45 pm, edited 1 time in total.
-
Klaus
- Posts: 14177
- Joined: Sat Apr 08, 2006 8:41 am
-
Contact:
Post
by Klaus » Sun Jul 22, 2007 5:31 pm
Hi Kai,
very strange.
...
visual dissolve
go next cd
...
visual effect dissolve
go next cd
...
Both work without problem.
Regards
Klaus
-
kpeters
- Posts: 112
- Joined: Wed Mar 21, 2007 9:32 pm
Post
by kpeters » Sun Jul 22, 2007 5:44 pm
That's what I thought!
2.8.1 Build 470
OS X 10.4.10
Does anyone else see this? Maybe my Rev install got damaged somehow?
Which files should yield which checksums?
Thanks for any help
Kai
-
malte
- Posts: 1098
- Joined: Thu Feb 23, 2006 8:34 pm
-
Contact:
Post
by malte » Sun Jul 22, 2007 6:04 pm
Have you turned on variable checking in the preferences? Are explicitvars true? In both cases it will throw an error.
All the best,
Malte
-
kpeters
- Posts: 112
- Joined: Wed Mar 21, 2007 9:32 pm
Post
by kpeters » Sun Jul 22, 2007 6:14 pm
Yes, Malte, indeed I have.
But what's the solution then? I do not understand how these things relate?
If, for instance, the 'dissolve' is really a variable parameter it must already be defined for the engine to act upon it. So why would the engine bitch about it (irregardless of these settings)?
TIA,
Kai
-
malte
- Posts: 1098
- Joined: Thu Feb 23, 2006 8:34 pm
-
Contact:
Post
by malte » Sun Jul 22, 2007 7:20 pm
Hi Kai,
one could argue that the expected syntax needs quotes and that the engine is forgiving enough if you forget them if explicitVars are false. It needs to be quoted, as it is a literal string and not a predefined constant like hand for example. Try in the messagebox:
put hand ->28
put dissolve -> dissolve
The script editor does the following if you check variables. When compiling the script it sets the explicitVars to true before compile and to false directly afterwards.
From the docs:
If the explicitVariables property is true, using a literal string without enclosing it in quotes causes a compile error.
So I *think* it is correct that the engine bitches about it. However, that's just me.
All the best,
Malte
-
kpeters
- Posts: 112
- Joined: Wed Mar 21, 2007 9:32 pm
Post
by kpeters » Sun Jul 22, 2007 7:44 pm
Excellent explanation - but then the Rev people really need to clearly mark these cases in the documentation - I certainly thought I was dealing with predefined constants (which they really could - and should? - be)
Thanks,
Kai