lock/unlock screen

Scott Rossi scott at tactilemedia.com
Sat Sep 22 14:51:29 EDT 2012

FWIW, in most cases a preOpenStack or preOpenCard handler in the card
script of the first card should be enough to position/orient a stack.  If
you try to set stack properties like windowShape or shadow, those actions
can cause the stack to become visible before positioning takes place
because they affect the stack's window, but otherwise, you should be able
to set a stack's position before opening it.

Setting the stack's position to the screenLoc should position the stack at
the stack at the center of the main monitor.  No lock screen or splash
stack is needed -- it should just work.

In the case where you do need to make a change to the stack's window for
example, you can do something like this:
on preOpenStack
  set bottomRight of this stack to -10000,-10000 -- make sure stack is
  set the windowShape of this stack to the id of image 1
  set loc of this stack to the screenLoc
end preOpenStack

That's a over-simple example but the idea is just to keep the stack's
location off screen until you're done modifying it.

Hope this helps.


Scott Rossi
Creative Director
Tactile Media, UX Design

On 9/22/12 10:48 AM, "Peter Haworth" <pete at lcsql.com> wrote:

>Thanks Richmond, I'll give that a try.  I'm also unsure as to whether lock
>screen has any effect in the preOpenxxx handlers since the screen isn't
>even displayed at that point.  But I guess it can't do any harm.
>lcSQL Software <http://www.lcsql.com>
>On Sat, Sep 22, 2012 at 10:41 AM, Richmond
><richmondmathewson at gmail.com>wrote:
>> Yes, I have had that problem before, so now I tend to put the "relocate"
>> script,
>> along with a lockscreen command in a preOpenStack command:
>> on preOpenStack
>>   set the lockScreen to true
>>    set the loc of stack "ZZZ" to the screenLoc
>>  set the lockScreen to false
>> end preOpenStack
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:

More information about the use-livecode mailing list