Page 2 of 2
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 4:53 pm
by dunbarx
I just noticed your name is "5imon"
I was making a general point. On my Mac, unless I am missing something, a windowShaped stack has no means of being moved about with the mouse. There is no titlebar with which to grab it. Decorations, for me, do not display in such a stack, and without a titlebar, no go.
I am doing something wrong, or it cannot be done. Somehow I think it isn't so much a matter of my doing something wrong as it is that I am not doing something right.
Craig
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 5:04 pm
by Klaus
Hi Craig,
take Simons script, put it into the script of any card and click and drag.
Will also work in a stack WITH decorations.
Best
Klaus
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 6:12 pm
by dunbarx
Klaus.
I know there are ways to do this as a kluge. Early on I posted:
Code: Select all
on mouseMove
if the mouse is down then set the loc of this stack to the screenMouseLoc
end mouseMove
You could always require that the screenMouseLoc be near the top of the stack. Not a problem. Whatever.
I was wondering if setting the windowShape of a stack REQUIRED such a thing, whatever that thing is. And whether it was just me, that no visible decorations were displayed in a windowShaped stack.
Craig
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 6:16 pm
by Klaus
Setting a windowshape removes of course the decorations without us having to do this explicitely.
So, yes "setting the windowShape of a stack REQUIRES such a thing" in any case, if you mean this kind of script with "such a thing".
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 6:49 pm
by dunbarx
Klaus.
OK. Not just me this time.
It makes sense, I just never used a windowShaped stack. Probably useful to include a note in the dictionary, that you cannot directly move such a stack with the mouse at all.
You have to ask how to do it on the forum
Craig
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 7:26 pm
by bogs
You mean like ths?
dictionary wrote:
Important! The border and title bar of a stack are not shown if the stack's windowShape is set. This means you will need to provide methods of dragging and closing the window if you want the user to be able to do these tasks.

- It is in there...
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 8:00 pm
by richmond62
This means you will need to provide methods of dragging and closing the window if you want the user to be able to do these tasks.
Pretty obvious as I discovered with RunRev 2.0.1 and windowShape a while ago.
-
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 8:29 pm
by SparkOut
If I recall correctly there is some "copy me" code for this in the "bouncy" stack that is included in the samples since as long as I know ago. I think it was always a good diving in place for new starters, even if it wasn't the most basic of techniques, it introduced some concepts and was fun frivolous.
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 8:39 pm
by dunbarx
You mean like ths?
EXACTLY. I have always been way ahead of my time.
Craig
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 8:46 pm
by bogs
dunbarx wrote: Wed Jun 24, 2020 8:39 pm
You mean like ths?
EXACTLY. I have always been way ahead of my time.
Craig
Um, which time did you mean, exactly?

- I do not think "ahead of my time..." means what you think that it means...
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 8:46 pm
by richmond62
on mouseMove
if the mouse is down then set the loc of this stack to the screenMouseLoc
end mouseMove
I posted your code into the image "JF" in my "Frog" stack, an,
as long as the mouse-when-down is inwith the image the stack is draggable.
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 10:18 pm
by dunbarx
Silicon, Bogs.
I mean I am not surprised that what seemed like a good idea to me was already in the literature, perhaps for centuries.
Craig
Re: Cannot drag stack with controls set to empty offscreen
Posted: Wed Jun 24, 2020 11:39 pm
by bogs
Bionic implants, Craig.... we really have to cure your ability to apply exponential numbers for common figures (decades, anyway)
