Trying to understand the inner workings of ResizeStack

Mark Waddingham mark at livecode.com
Tue Mar 15 05:22:58 EDT 2016


On 2016-03-15 10:15, Terence Heaford wrote:
>> On 15 Mar 2016, at 09:03, Mark Waddingham <mark at livecode.com> wrote:
>> 
>>> 5. Is it necessary to call lock screen in myUpdateGeometry and
>>> dispatch “refreshChart”?
>> 
>> No - the screen is implicitly locked before the resizeStack message is 
>> sent, and unlocked afterwards. Then the screen is explicitly updated.
> 
> 
> Does having a lock and unlock screen pair in refreshChart have any
> detrimental effect when it is called from resizeStack?

The screen lock mechanism uses a counter. So as long as all your lock 
screens have a matching unlock screen which is executed then they will 
have no effect (due to the fact the counter will already be 1 before 
your resizeStack script runs).

> Does having a lock and unlock messages pair in refreshChart have any
> detrimental effect when it is called from resizeStack?

Again, the message lock mechanism is counter based. So as long as they 
are matched there would be no outward effect - apart from not having 
messages sent to your objects by the engine whilst the count > 1.

> Will try to put together a test stack and video grab of the screen 
> flash.
> 
> I am using an iMac, El Capitan.

Thanks!

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list