Thanks, Bjorne:
That works. So I guess livecode is always trying to update the screen image, 
unless the screen is locked. But, it gets behind sometimes, so needs a little 
wait time.

Bill

William Prothero
http://es.earthednet.org



On Oct 1, 2013, at 11:06 AM, Björnke von Gierke <[email protected]> wrote:

> Most likely your examples are part of larger scripts. Always make sure that 
> you unlock the screen as often as you lock it. 'lock screen' is symetrical 
> additive, and not on/off switches like most other properties. So if you do 
> two locks, and one unlock the screen is still locked. If that is not your 
> problem, sometimes LC can be a bit cautious with screen refreshes, it tries 
> to do some optimisation by not actually showing all screen changes all the 
> time.
> 
> In that case try to experiment with "wait". Personally I like this form to 
> force a screen refresh (again, only if lock screen is not enabled):
> 
> wait with messages for 0 seconds
> 
> note that 'with messages' can impede the speed of your code, and I haven't 
> tested if it's actually better then without. However it seemed to be the best 
> way to make sure (again if lock screen is not enabled somewhere) to get a 
> screen refresh.
> 
> As a final note, if your script runs in a 'resizeStack' handler, never use 
> lock screen (again because of internal optimisation the screen is actually 
> already locked in an opaque way).
> 
> On 01.10.2013, at 01:36, [email protected] wrote:
> 
>> This seems like it should be easy, but I can't find anything in the 
>> documentation.
>> 
>> I have a large map image that I want to draw onto. I have defined a 
>> viewport, which is a graphic rectangle and all parts of the map that are not 
>> within the viewport are hidden. The large map will move around, magnify, 
>> etc. This all works. I want to draw symbols on the visible part of the map, 
>> and in order to make this efficient, I take a snapshot of the part of the 
>> map that's in the viewport and will use that for the symbols. 
>> 
>> To do the snapshot, I first set the visible of the snapshot image to false, 
>> take the snapshot of the map, then set the visible of the snapshot image to 
>> true.
>> 
>> Set the visible of snapShotImage to FALSE
>> take snapshot -- this takes the snapshot of the snapsShotImage
>> Set the visible of the snapShotImage to TRUE --this does not refresh the 
>> screen. 
>> 
>> I can get it to work if I do:
>> Set the visible of snapShotImage to FALSE
>> take snapshot -- this works
>> wait 0.2 seconds
>> Set the visible of the snapShotImage to TRUE --this does refresh the screen
>> 
>> Is this the best way to force a screen refresh???
>> 
>> Bill
>> 
>> William Prothero
>> http://es.earthednet.org
>> 
>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> [email protected]
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> -- 
> 
> Use an alternative Dictionary viewer:
> http://bjoernke.com/bvgdocu/
> 
> Chat with other RunRev developers:
> http://bjoernke.com/chatrev/
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Reply via email to