Trying to understand the inner workings of Resizestack
Ralph DiMola
rdimola at evergreeninfo.net
Mon Mar 14 11:29:44 EDT 2016
1) The resizestack message is sent once is live resizing if off. If live resizing is on then a whole bunch of messages get stacked up if you grab a corner and resize the stack. If you resizing code is fast enough then resizing will look seamless, if your resizing takes too long the it will be jerky.
2) The screen is automatically locked/unlocked for each message. You don’t have to worry about it.
3) I would not do any dispatching or sending in time in a resizestack handler. This is probably the source of your flashing. Get the work done and then pass the resizestack message to the engine. I found out that sometimes things can go sideways if you don’t pass the resizestack message.
Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net
-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of Terence Heaford
Sent: Monday, March 14, 2016 10:58 AM
To: How to use LiveCode
Subject: Trying to understand the inner workings of ResizeStack
Resent message because of copy/paste from docs did not work well.
Consider:
--------
on resizeStack pWidth,pHeight
myUpdateGeometry
dispatch "refreshChart" to group "netWorthChart"
--pass resizeStack
end resizeStack
The docs say:
The resizeStack message is sent after the resizing is finished. If the stacks live resizing property is true, resizeStack messages are sent continuously during resizing...
The screen is locked while a resizeStack handler is running, so it is not necessary to use the lock screen command to prevent changes from being seen. (However, the lockScreen propertyis not set to true.)
-----------
1. If you drag a window to resize it, the resize message is sent more than once?
2. and resizeStack is called each time? Is the screen locked more than once and is it accumulative.
3. Does resizeStack automatically unlock the screen after each pass?
4. Do multiple resizeStack messages get sent by LC even though myUpdateGeometry and dispatch “refreshChart” may not have completed (if they are long scripts)?
5. Is it necessary to call lock screen in myUpdateGeometry and dispatch “refreshChart”?
Why am I asking?
Because I get a weird screen flash in “refreshChart” if the first line of the script is not unlock screen.
Thanks
Terry
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list