Problem with "dissolve" visual effect

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
ClintMA
Posts: 39
Joined: Thu Jan 21, 2016 2:52 am

Problem with "dissolve" visual effect

Post by ClintMA » Tue Feb 09, 2016 3:38 am

Can someone explain this to me?

These two lines compile (and work) without problem:

Code: Select all

visual effect scroll up
go next card
But these two line generate an error message:

Code: Select all

visual effect dissolve
go next card
The error message is: "stack "CD": compilation error at line 17 (Expression: unquoted literal), char 17"

I copied the latter code directly from an example in the "visual effects" entry in LiveCode's Dictionary.

I'm using the Community version 7.1.1 on Windows 7.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Problem with "dissolve" visual effect

Post by Simon » Tue Feb 09, 2016 5:06 am

Hi Clint,
The syntax has changed slightly

Code: Select all

lock screen for visual effect
go to card "window 2"
unlock screen with visual effect dissolve
I guess the dictionary hasn't caught up.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ClintMA
Posts: 39
Joined: Thu Jan 21, 2016 2:52 am

Re: Problem with "dissolve" visual effect

Post by ClintMA » Tue Feb 09, 2016 9:17 am

Thanks, Simon!

It sad to think of hours of wasted time people spend on undocumented featues. Not to mention the frustration.

I've long held that an undocumented feature is actually an undocumented bug.

If only the LiveCode developers would pledge that no feature would be released until its documentaion was available to be released simultaneously. (This should be a moral requirement of any sodlftware that advertises itself as easy to learn.)

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Problem with "dissolve" visual effect

Post by FourthWorld » Tue Feb 09, 2016 5:54 pm

Both forms should work.

I just tested this one:

Code: Select all

visual effect dissolve
go next card
...and it works fine in v7.1.2, and I don't believe it's changed since v7.1.1 (though I haven't reviewed the Release Notes to make sure).

My hunch is that the issue is different, perhaps with regard to the destination card object specifier. Are you using the code as provided, or what there any difference there? It may be helpful to see the full handler to determine what's happening with that.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Problem with "dissolve" visual effect

Post by Klaus » Tue Feb 09, 2016 6:22 pm

Hi Richard,

although you can get away with:

Code: Select all

visual effect dissolve
go next card
on the desktop, this might crash on iOS!

So better get used to the new syntax :D
And yes, it should be documanted better!


Best

Klaus

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Problem with "dissolve" visual effect

Post by FourthWorld » Tue Feb 09, 2016 7:25 pm

Klaus wrote:although you can get away with:

Code: Select all

visual effect dissolve
go next card
on the desktop, this might crash on iOS!

So better get used to the new syntax :D
And yes, it should be documanted better!
Interesting mobile limitation. Do you know if the bug report against that Dictionary entry has been filed?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Problem with "dissolve" visual effect

Post by Klaus » Tue Feb 09, 2016 7:48 pm

Hi Richard,
FourthWorld wrote:Do you know if the bug report against that Dictionary entry has been filed?
no, sorry.


Best

Klaus

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Problem with "dissolve" visual effect

Post by [-hh] » Tue Feb 09, 2016 8:48 pm

In LC 7.1.1 and LC 8.0.0 dissolve isn't listed any more among the effects although the main example still uses dissolve.

Perhaps it's also the effect and not only the syntax that makes problems?
shiftLock happens

ClintMA
Posts: 39
Joined: Thu Jan 21, 2016 2:52 am

Re: Problem with "dissolve" visual effect

Post by ClintMA » Wed Feb 10, 2016 9:25 am

Simon,

Unfortunately, I'm still getting an error message with the code you suggested. Here's the code I using (it's in the stack script of a stack call "Splash" that has a substack called "CD"):

Code: Select all

on keyUp theKey
   if theKey is space then
      if the short name of this stack is "Splash" then
         hide this stack
         go to stack "CD"
      else
         lock screen for visual effect
         go to card "window 2"
         unlock screen with visual effect dissolve 
      end if
   else if theKey is "p" then
      --  [Other code here ]
      --  
      --     
   else if theKey is "c" then 
      --  [Other code here ]
      --  
      --     
   end if
end keyUp
The error message occurs on the "unlock screen" line and reads:

stack "Computer Daydreams": compilation error at line 19 (Expression: unquoted literal), char 35

Could the problem be that the script is in the main stack, but is calling for action in the substack? (Just a guess.)

Herman, the Dissolve special effect IS listed in the list of available special effects in the Dictionary for 7.1.1 (near the middle of the list).

Also, could someone explain the part of the suggested visual effect code that reads: card "window 2"
What is this Window 2? I have been unable to find anything about it in the documentation.

Thanks for everyone's help.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Problem with "dissolve" visual effect

Post by Klaus » Wed Feb 10, 2016 11:18 am

ClintMA wrote:... card "window 2"
What is this Window 2? I have been unable to find anything about it in the documentation.
Since it is QUOTED, I highly suspect this is a (very badly chosen) name of the target CARD! :D

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Problem with "dissolve" visual effect

Post by Simon » Wed Feb 10, 2016 3:33 pm

Is this a result of "Strict Compilation mode"?
stack "Computer Daydreams": compilation error at line 19 (Expression: unquoted literal), char 35
In which case I think you quote "dissolve".

Yes, "window 2" is a string, could be any name of an existing card.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ClintMA
Posts: 39
Joined: Thu Jan 21, 2016 2:52 am

Re: Problem with "dissolve" visual effect

Post by ClintMA » Wed Feb 10, 2016 9:01 pm

OK, problem solved!

This code works:

Code: Select all

         lock screen for visual effect
         go to next card
         unlock screen with visual effect "dissolve" 
The quote marks around the desired visual effect are required.

Thanks Simon (and the other previous commentors) for your help.

Post Reply