Hi Jacques,

When you copy a resized picture, Revolution may restore the original dimensions. Copy the picture first, then resize the new picture, or use the imagedata of the old picture to set the imagedata of the new picture. If you do the latter, set the dimensions of the new picture to formattedHeight and formattedWidth.

I strongly recommend not to use the geometry manager. Instead, write your own scripts in a resizeStack handler. This is more reliable and gives you more control in situations like these.

Your incomplete scripts don't give me a good impression of what is going on, hence I can't tell you why the screen unlocks prematurely. Do you have an answer or ask dialogue somewhere? Are you repeating or waiting with messages perhaps?

Note that locking the screen doesn't really lock the entire screen and not even the entire Revolution interface. It only locks windows, while they are redrawn in memory.

In the case of your particular stack, when the resizeStack handler runs, all other handlers have finished already, because I don't see an explicit call to the resizeStack handler. If a handler containing the lock screen command finishes, the screen unlocks. This means that screen will unlock before the resizeStack handler runs.

Just a few thoughts. I hope this helps.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer

Full PayPal integration and automation in web site or (Revolution/ SuperCard/other) software. Contact me for a quote
http://economy-x-talk.com/contact.html

Op 15 dec 2009, om 12:45 heeft Jacques Hausser het volgende geschreven:

Thanks, Mark. Works for almost everything, except for a copy of a picture (I have the original picture hidden and resized in the background, and a visible copy of it to work on). I tried two solutions

1) resize the original picture and recopy it in my changeStackSize command:

command changeStackSize
  lock screen
  -- (computes and sets the new size)
  resetpicture -- (resizes the original picture and recopy it)
end changeStackSize

The picture is not resized... why ?

2) catch the resizeStack message and resize the picture from there

command changeStackSize
  lock screen
  -- (computes and sets the new size)
end changeStackSize

on resizeStack
  lock screen
  revupdateGeometry
  resetpicture - (resizes the original picture and recopy it)
end resizeStack

the picture is resized OK, but you see the two successive steps on the screen...
Needless to say that resetpicture is the same in both cases...

Jacques

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

Reply via email to