Problem with drag/drop of a group
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Problem with drag/drop of a group
Working on a custom translucent palette (with implied capability of repositioning by dragging from the top region) and not having success with use of grab/mouseMove technique... Have posted the small test stack for detailed exam. Again, I need the drag/drop capability of a palleted stack but can't achieve the translucency needed with a substack.
https://www.dropbox.com/s/5myhf93ce4dci ... ecode?dl=0
Any pointers greatly appreciated.
https://www.dropbox.com/s/5myhf93ce4dci ... ecode?dl=0
Any pointers greatly appreciated.
rebuilding visual programming app originally created in 1993 as Hypercard stack
Re: Problem with drag/drop of a group
Hi Mel,
OK, I downbloaded the stack but have no idea what should happen and when?
No "grab/mousemove" handler in the stack!?
Best
Klaus
OK, I downbloaded the stack but have no idea what should happen and when?
No "grab/mousemove" handler in the stack!?
Doiu you mean setting "the blendlevel" of that stack?..but can't achieve the translucency needed with a substack.
Best
Klaus
Re: Problem with drag/drop of a group
My apology Klaus. I removed the mousedown mousemove handlers. Just looking for a pointer (have looked myself!) to scripting related to dragging a control from top (in case posted, green bar area only). ...Behavior like a standard paletted stack.
rebuilding visual programming app originally created in 1993 as Hypercard stack
Re: Problem with drag/drop of a group
Hi Mel,
I added this little snippet to the groups script and it worked as exspected.
I had to add the name of the group, otherwise I got a "could not find background" error.
Is that what you mean?
Best
Klaus
I added this little snippet to the groups script and it worked as exspected.
I had to add the name of the group, otherwise I got a "could not find background" error.
Code: Select all
on mousedown
if the short name of the target = "ioMap" then
grab grp "ioMap"
end if
end mousedown
Best
Klaus
Re: Problem with drag/drop of a group
Thanks Klaus
After a cup of coffee I believe I have a solution:
https://www.dropbox.com/s/es1oo24gat2ci ... ecode?dl=0
not sure how foolproof it is but...
After a cup of coffee I believe I have a solution:
https://www.dropbox.com/s/es1oo24gat2ci ... ecode?dl=0
not sure how foolproof it is but...
rebuilding visual programming app originally created in 1993 as Hypercard stack
Re: Problem with drag/drop of a group
Hi Mel,
I modified your script a bit ansd still works a exspected:
The "mousemove" handler is a bit overkill, no need to adjust the loc in any way, looks like a correct "mousedown" handler is enough.
Best
Klaus
I modified your script a bit ansd still works a exspected:
Code: Select all
...
on mouseDown
if the short name of the target is "dragMap" then
## grab the target
## Will only move the text field named "dragMap"
grab group "ioMap"
end if
end mouseDown
## Not neccessary!
#on mouseMove
# if the mouse is down then
# if the short name of the target is "dragMap" then
# put ((item 1 of the loc of the target)+16)&","&((item 2 of the loc of the target)+105) into locAdjustment
# set the loc of group "ioMap" to locAdjustment
# end if
# end if
#end mouseMove
...

Best
Klaus
Re: Problem with drag/drop of a group
That's really simple! Good to learn. Thanks again Klaus.
rebuilding visual programming app originally created in 1993 as Hypercard stack