How to detect zoombox click

Bill Vlahos bvlahos at mac.com
Sat Jul 16 23:41:58 EDT 2011


Craig,

That is interesting.

Dragging the stack window also generates a movestack message just like resizing a window generates a resizestack message.

Is there a way to test for a simultaneous movestack and resizestack messages? Unless I find a unique message for that control detecting simultaneous movestack and resizestack messages should do the trick.

On my Mac the resizeStack message is sent first then the moveStack message. The following script works but seems like a huge kludge. Is that order consistent between different versions or Rev/LC and on different platforms?

To test put this script in the stack and create a field called "one" and then manipulate the stack window.

global vZoom

on resizeStack
   put  the seconds into vZoom
end resizeStack

on moveStack
   if vZoom - the seconds = 0 then put "ZoomBox click" into field "one"
   else put "Move or resize" into field "one"
end moveStack

Is there a more elegant way to detect simultaneous messages?


Bill Vlahos
_________________
InfoWallet (http://www.infowallet.com) is about keeping your important life information with you, accessible, and secure.

On Jul 16, 2011, at 8:01 PM, DunbarX at aol.com wrote:

> A  movestack message is also sent. Not sure why, though.
> 
> 
> Might this help, since resizing the window manually does not send this message?
> 
> 
> Craig Newman
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Bill Vlahos <bvlahos at mac.com>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Sent: Fri, Jul 15, 2011 6:57 pm
> Subject: How to detect zoombox click
> 
> 
> I want to detect when a user clicks the zoombox (green light on a Mac) and do 
> something similar to iTunes where if you click the zoombox the program doesn't 
> just resize itself but goes into a different mode.
> 
> The only message I see is a resizeStack message but that happens if the user 
> resizes the window manually.
> 
> Bill Vlahos
> _________________
> InfoWallet (http://www.infowallet.com) is about keeping your important life 
> information with you, accessible, and secure.
> 
> 
> _______________________________________________
> 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
> 
> 
> 
> _______________________________________________
> 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