LOCKSCREEN

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trailboss
Posts: 121
Joined: Sat Dec 13, 2008 4:55 pm

LOCKSCREEN

Post by trailboss » Mon Jul 18, 2011 10:36 pm

I have a script that sends a mouseup to a button on a card in another stack. Then it runs around the stack gathering up data. I push the card and pop the card. I have put "set lockscreen to true" at the beginning and "set lockscreen to false" at the end of the script, but I still see one flash of the other stack each time I put the button. It isn't locked for the whole time apparently. Is this because my script hops between stacks? What's the key to making lockscreen truly stop changes from being seen on the screen? It only flashes once with a quick view of one card on the other stack.

Thanks
Tom

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9579
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: LOCKSCREEN

Post by dunbarx » Tue Jul 19, 2011 12:05 am

Make two stacks, "xxx" and "zzz". On stack "xxx", place a button that contains:

Code: Select all

on mouseUp
   send "mouseUp" to button 1 of stack "zzz"
end mouseUp
In stack "zzz" make a button and one field. The field has seven lines of random data. The button contains

Code: Select all

on mouseUp
   get line random(7) of fld 1
   put it
end mouseUp
No need to lock anything, no flashing. You never need to "leave" stack "xxx".

Craig Newman

trailboss
Posts: 121
Joined: Sat Dec 13, 2008 4:55 pm

Re: LOCKSCREEN

Post by trailboss » Tue Jul 19, 2011 5:02 am

This is a great improvement. I get a tiny flash, but it's the same screen; not the other stack. I think it's my scripting which is like something out of a drug addict's nightmare that makes it go the slightest bit wrong. I don't know why this would work, but you know I guess I have LEFT the stack because on the button over there, I have it go to other cards to get the data and thus I do need the lockscreen. If I had just written script to get the data off of a card instead of saying "go to this card and gather up the data" I think there would be no need for a lockscreen.

Thanks very much for this. The only flash I get is vary occasionally and as I said I don't see a flash from the other stack.

Tom

Post Reply

Return to “Talking LiveCode”