On 09/22/2012 08:36 PM, Peter Haworth wrote:
Here's another nuance on lock screen, throwing in preOpenCard processing
just for good measure!

My preOpenCard code includes lock and unlock screen commands. While the
screen is locked, I alter the stack's topLeft property, expecting that the
user would see the stack in the location I set it to.

However, the stack is initially displayed in one location then jumps to the
location I set it to.

My understanding of preOpenCard is that it happens before the stack is
displayed so  this behavior puzzles me.  I had to move the code that
adjusts the stack's topLeft into another handler and execute it via a "send
in zero" command in order to get round some other issues with preOpenCard -
could it be that delays the setting  of topLeft long enough that it doesn't
happen until after preOpenCard is done?

This all with LC 5.5.0 and OS X 10.7.4.

Pete
lcSQL Software <http://www.lcsql.com>



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

Richmond.

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to