Page 1 of 1

Conflict of interests

Posted: Wed Jul 03, 2024 9:17 am
by richmond62
Somewhere, somewhen, developing some sort of code blocks I came up against a real nasty.
-
Screenshot 2024-07-03 at 11.08.50.png
-
This is a 'pretty little' group consisting of an underlying image:
-
moveBACK65.png
moveBACK65.png (11.36 KiB) Viewed 1803 times
-
a drop-down menu, and a text field.

The whole confection is grouped, and the group contains this code:

Code: Select all

on mouseDown
grab me
end mouseDown
on attempting to grab the group and move it the IDE crashes.

The crash seems to occur when the mouseDown also triggers the popup thingy of the drop-down menu.

Re: Conflict of interests

Posted: Wed Jul 03, 2024 9:27 am
by richmond62
diagram.png
diagram.png (16.29 KiB) Viewed 1797 times
-
A mouseDown in area #1 allows the group to be moved without any problems.

A mouseDown in area #2 (the drop-down menu) crashes the IDE.

Re: Conflict of interests

Posted: Wed Jul 03, 2024 9:47 am
by richmond62
I solved the problem . . .

I deleted the code in the GROUP:

Code: Select all

on mouseDown
grab me
end mouseDown
and put this code into the codeblock image:

Code: Select all

on mouseDown
grab group "tMOVE"
end mouseDown
That was, frankly, an idea that annoyed me immensely that I had not thought of it sooner.

Re: Conflict of interests

Posted: Wed Jul 03, 2024 2:41 pm
by SparkOut
Maybe alternatively: if the name of the target is the name of me (the group) then grab me
?