Page 1 of 1

Making a stack movable (issues)

Posted: Wed Dec 09, 2009 9:51 pm
by imediapub
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

Re: Making a stack movable (issues)

Posted: Fri Dec 11, 2009 2:11 pm
by ale870
Hello,

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

Thank you

Re: Making a stack movable (issues)

Posted: Fri Dec 11, 2009 9:19 pm
by kotikoti
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...