Making a stack movable (issues)

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
imediapub
Posts: 1
Joined: Tue Dec 08, 2009 10:14 pm

Making a stack movable (issues)

Post by imediapub » Wed Dec 09, 2009 9:51 pm

Hello

We were following the tutorial on Skinning. It all works well, but when we launch an external application from a button, the stack seems to 'follow' the mouse as if it's still be held down so, when we move out side of the external application, the stack 'jumps' to that new location.

Any ideas on how to fix this?

Thanks,

Joe

ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Re: Making a stack movable (issues)

Post by ale870 » Fri Dec 11, 2009 2:11 pm

Hello,

can you post the code you use to exec external app (message included)?

Thank you
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki

kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

Re: Making a stack movable (issues)

Post by kotikoti » Fri Dec 11, 2009 9:19 pm

Hi Joe,

Not using an external but here goes...
Using a borderless stack where I have placed the following code in the header strip that allows for moving the stack window. I think what you might need is to ensure that the "controller" variable allowDrag is unset prior to launching your external...

Code: Select all

global allowDrag

on mouseDown
  put mouseH() & "," & mouseV() into allowDrag
end mouseDown

on mouseMove x,y
  if allowDrag is empty then exit mouseMove
  set topLeft of this stack to globalLoc(x-item 1 of allowDrag & "," & y-item 2 of allowDrag)
end mouseMove

on mouseUp
  put empty into allowDrag
 end mouseUp

on mouseRelease
  mouseUp
end mouseRelease

on mouseLeave
  put empty into allowDrag
end mouseLeave


see Scott Rossi's article http://runrev.com/newsletter/may/issue7 ... etter3.php

I assume you have similar code in your stack, and think the on mouseLeave call would unset the variable stopping the effect you getting...
Build 160
Version 2.9.0
Platform: Windows

Post Reply