Page 1 of 1
Constrained Grab
Posted: Mon Jul 25, 2016 1:50 pm
by richmond62
Re: Constrained Grab
Posted: Tue Jul 26, 2016 12:59 pm
by richmond62
2 hours on a dentist's chair while she does a "happy" root-canal thing on me, and another, almost as painful,
operation on my bank account; and the result is that I trip out on the anaesthetic (not quite up the the standard of
Bill Atkinson's LSD I'm afraid) and do this:

- BloodyM.png (9.52 KiB) Viewed 10992 times
Another thing I really
LOVE about
Livecode is that when loads of people make
really intelligent suggestions about how to do things I can still be a
thorn in the flesh
and go for another way to do that.
Here's the second version of the Slide-Rule:
https://www.dropbox.com/s/fb868icd5cg3x ... e.zip?dl=0
Re: Constrained Grab
Posted: Tue Jul 26, 2016 4:57 pm
by richmond62
In the second method it is almost impossible for an end-user to move the slide of the slide-rule with any precision.
Re: Constrained Grab
Posted: Wed Dec 20, 2017 9:46 pm
by richmond62
After a longish time, here's version 3 of my Slide Rule stack:
https://www.dropbox.com/s/td1dbu923rh3t ... e.zip?dl=0
The underlying scripts are both different and considerably simpler: although the slides still
wobble in a most annoying fashion.
Re: Constrained Grab
Posted: Wed Dec 20, 2017 10:31 pm
by bogs
richmond62 wrote: ↑Wed Dec 20, 2017 9:46 pm
... although the slides still wobble in a most annoying fashion.
I do too on occaision

Re: Constrained Grab
Posted: Thu Dec 21, 2017 7:18 am
by richmond62
Face facts: most of us are kinky in one way or another; and as a person who believes in "letting it all hang out" I'm offering you the chance to do just that with this:
Better than unwrapping another pair of socks from your ancient aunty in Melbourne!
Re: Constrained Grab
Posted: Thu Dec 21, 2017 5:48 pm
by Da_Elf
Ok ive got a button inside of a group that you click the button to drag the group. The first post in here looked like it should have worked but it doesnt.
Code: Select all
local returnLocation
local currentScroll
on mouseDown
set the idleRate to 0
put the location of the owner of me into returnLocation
grab the owner of me
put (item 1 of the loc of the owner of me,item 2 of returnLocation) into resetloc
set the text of fld "testlocation" to resetloc
set the loc of the owner of me to resetloc
end mouseDown
on mouseStillDown
put (item 1 of the loc of the owner of me,item 2 of returnLocation) into resetloc
set the text of fld "testlocation" to resetloc
set the loc of the owner of me to resetloc
end mouseStillDown
on mouseUp
put the location of the owner of me into newlocation
put item 1 of newlocation into xclocation
put item 1 of returnLocation into xrlocation
if (xclocation > (xrlocation + 200)) then
--do something
end if
set the location of the owner of me to returnLocation
end mouseUp
Re: Constrained Grab
Posted: Thu Dec 21, 2017 6:21 pm
by jmburnod
Hi,
A way using mouse move.
Btn script
Code: Select all
local cX,yLoc,sMove,sLaCible
on mousedown
put the owner of the target into sLaCible
put true into sMove
put (the mouseH - item 1 of the loc of sLaCible) into cX
put (the mouseV - item 2 of the loc of sLaCible) into yLoc
end mousedown
on mousemove x,y
if sMove then
if there is a sLaCible then
set loc of sLaCible to x-cX,y-yLoc
end if
end if
end mousemove
on mouseup
put false into sMove
end mouseup
Best regards
Jean-Marc
Re: Constrained Grab
Posted: Thu Dec 21, 2017 6:39 pm
by Da_Elf
Still doesnt work. i will try to strip down the project to post it
Re: Constrained Grab
Posted: Thu Dec 21, 2017 7:21 pm
by jmburnod
Hi Da_Elf,
If you want drag a group when you click only on a btn of this group as I understand your prev post
a button inside of a group that you click the button to drag the group
It should work
Jean-Marc
Re: Constrained Grab
Posted: Thu Dec 21, 2017 9:41 pm
by richmond62
Code: Select all
on mouseDown
grab me
put item 1 of the loc of me into WUN
set the idleRate to -1
set the loc of me to WUN,WUN
put the loc of me into fld "LOQ"
end mouseDown
on mouseMove
set the idleRate to -1
put item 1 of the loc of me into WUN
set the loc of me to WUN,WUN
put the loc of me into fld "LOQ"
end mouseMove
on mouseUp
set the idleRate to -1
put item 1 of the loc of me into WUN
set the loc of me to WUN,WUN
put the loc of me into fld "LOQ"
end mouseUp
This is a "Right load of cobblers" as things get badly stuck on
mouseUp.
Re: Constrained Grab
Posted: Thu Dec 21, 2017 10:33 pm
by Da_Elf
I cant seem to open that file.
This is my file
Re: Constrained Grab
Posted: Fri Dec 22, 2017 11:05 am
by richmond62
Um:
I cant seem to open that file.
2 can play at that game
Someone maybe about to get his prawns cut off for accidently releasing a confidential file; THIS
is what was inside "swipe.zip":