lock/unlock screen

Peter Haworth pete at lcsql.com
Sun Sep 23 12:31:14 EDT 2012

I moved my code to preOpenStack - I still see the change in location on the
screen.  It appears I will have to resort to some subterfuge like the one
suggested by Scott, or opening the stack invisible initially to make this

>From the dictionary:
"The *preOpenCard* message <dictionary/keyword/1473.xml> is sent before the
openCard <dictionary/message/1706.xml> message <dictionary/keyword/1473.xml>.
Unlike openCard <dictionary/message/1706.xml>, *preOpenCard*
executed <glossary/e/188.xml> *before the card
*. "

"The *preOpenStack* message <dictionary/keyword/1473.xml> is sent before
the openStack <dictionary/message/1709.xml>
Unlike openStack <dictionary/message/1709.xml>, *preOpenStack*
executed <glossary/e/188.xml> *before the stack window

I guess LC's definiton of "before" is a little different than most peoples
lcSQL Software <http://www.lcsql.com>

On Sat, Sep 22, 2012 at 12:00 PM, Peter Haworth <pete at lcsql.com> wrote:

> Thanks to all for the explanations and suggestions.  The common thread
> seems to be to use preOpenStack rather than preOpenCard so I'll move my
> code there and see what happens.
> Pete
> lcSQL Software <http://www.lcsql.com>
> On Sat, Sep 22, 2012 at 11:51 AM, Scott Rossi <scott at tactilemedia.com>wrote:
>> 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
>> offscreen
>>   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.
>> Regards,
>> Scott Rossi
>> Creative Director
>> Tactile Media, UX Design

More information about the use-livecode mailing list