Modal command does not pause anymore the calling script

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trevix
Posts: 1085
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Modal command does not pause anymore the calling script

Post by trevix » Thu Aug 06, 2009 6:30 pm

Rev 3.5
All of a sudden, the script that open a substack as modal does not pause anymore while the modal substack is open (used to work fine. Now sometime it still does).

Any clue ?

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Fri Aug 07, 2009 1:22 pm

Can you provide a sample script? At what point does it work? At what point does it not?
Parañaque, Philippines
Image
Image

trevix
Posts: 1085
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Post by trevix » Fri Aug 07, 2009 4:14 pm

I did further investigation:

With a brand new stack, the problem does not exist.
My script is too long to bring it here. The problem is herratic... it seem that it works on the first run of the stack, but not always.

But the same script on a previous version of the stack does not have the problem.

As a byproduct, a debug stop (even a breakpoint) on the preopencard script of the modal stack does not stop the script (but the script is run...)

I was hoping there was some known bug and I could just replace some Rev preferences to solve the problem (done, but it does not work)

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Fri Aug 07, 2009 7:58 pm

Hi Trevix,

any chance that the substack you call is invisible? If so modal will not work and imediately close the substack. Could you try in your script:

show stack "yourSubstack"
modal "yourSubstack"

Does that make any difference?

Cheers,

Malte

trevix
Posts: 1085
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Post by trevix » Fri Aug 07, 2009 8:16 pm

There is already a show stack before the modal call.
I solved the problem going back to the previous version of my stack and updating the changes.
Now the modal call stop the script. But the PreOpenStack on it still cannot be debugged and i think this is the culpit:
I've noticed before that sometime the red dots do not stop the script for debugging. Some do, other dont. You often have to put them again on place.
And this is a bug for shure...
Thanks anyway.

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

Post by Klaus » Tue Aug 11, 2009 10:24 am

I also encountered this strange and not reproducable! problem in a simply script like:
...
answer "All files loaded!"
quit
...

I almost never saw the dialog, the app quit immediately WITHOUT waiting for the dialog to close! :/


Best

Klaus

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Tue Aug 11, 2009 12:27 pm

I alos tried Klaus's

Code: Select all

answer "All files loaded!" 
quit 
script and it works for me. Revolution doesn't quit until I press the OK button. I got 4.0.0-dp-3.
Parañaque, Philippines
Image
Image

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

Post by Klaus » Tue Aug 11, 2009 1:38 pm

Lucky you! 8)

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Wed Aug 12, 2009 12:26 pm

Klaus wrote:Lucky you! 8)
I think it's an OS-related bug. Are you guys using Mac OS? I'm in a Windows XP SP2 computer.
Parañaque, Philippines
Image
Image

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

Post by Klaus » Wed Aug 12, 2009 1:32 pm

shadowslash wrote:
Klaus wrote:Lucky you! 8)
I think it's an OS-related bug. Are you guys using Mac OS? I'm in a Windows XP SP2 computer.
LOL :D :D :D
You made my day :wink:

trevix
Posts: 1085
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

Post by trevix » Thu Aug 13, 2009 11:58 am

Funny indeed...
the

Code: Select all

answer "All files loaded!"
quit 
works on OSX.
Sometime, in my scripts, I am able to resolve the thing adding a "wait 100 milliseconds"
It's like if Rev cannot cach up with the script...
I have not tested the problem in a compiled application (I wonder...)

Post Reply