Grabbing a widget

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Grabbing a widget

Richard Gaskin via use-livecode
is problematic.

I have an SVG widget called "h5" which I am trying to drag to a drop target,
which should be easy-peasy, but isn't.

LiveCode 8.1.8

The widget contains this code:

on mouseDown
    grab me
end mouseDown

on mouseUp
    if intersect(widget "h1", widget "h5",5) then
       set the loc of widget "h5" to the loc of widget "h1"
    else
       set the loc of widget "h5" to 99,364
       end if
end mouseUp

which is nothing spectacular.

HOWEVER in Edit mode widget "h5" moves around with the mouse!

It does NOT get grabbed on a MouseDown as it should.

Richmond.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
Hi Richmond,

> Am 27.06.2018 um 16:50 schrieb Richmond Mathewson via use-livecode <[hidden email]>:
>
> is problematic.
> I have an SVG widget called "h5" which I am trying to drag to a drop target,
> which should be easy-peasy, but isn't.
> LiveCode 8.1.8
> The widget contains this code:
> on mouseDown
>   grab me
> end mouseDown
> on mouseUp
>   if intersect(widget "h1", widget "h5",5) then
>      set the loc of widget "h5" to the loc of widget "h1"
>   else
>      set the loc of widget "h5" to 99,364
>      end if
> end mouseUp
> which is nothing spectacular.
> HOWEVER in Edit mode widget "h5" moves around with the mouse!
> It does NOT get grabbed on a MouseDown as it should.
>
> Richmond.

just ried this at home with LC 9, and it is even worse!

I added a SVG widget to a fresh stack and added this script:
on mouseDown
  grab me
end mouseDown

BUT, it moves with the mouse with the EDIT tool (no mousedown!), if it is selcted or not
and does nothing when I switch to POINTER tool and click until my wrist gets numb!?

Before I bug report it, anyone seeing this, too?


Best

Klaus
--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
Hi all,

here my recipe macOS 10.13.5, LC 9:
1. Create a stack
2. Create a SVG widget
3. Add this script to the SVG:
on mouseDown
  grab me
end mouseDown
4. Switch to POINTER tool
5. Nothing happens, no GRAB on mousedown!
6. Switch back to EDIT tool and move the mouse to the stack with the SVG,
et voila paranoia 8-)

> Am 27.06.2018 um 16:57 schrieb Klaus major-k via use-livecode <[hidden email]>:
> ...
>
> just ried this at home with LC 9, and it is even worse!
>
> I added a SVG widget to a fresh stack and added this script:
> on mouseDown
>  grab me
> end mouseDown
>
> BUT, it moves with the mouse with the EDIT tool (no mousedown!), if it is selcted or not
> and does nothing when I switch to POINTER tool and click until my wrist gets numb!?
> Before I bug report it, anyone seeing this, too?

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
In reply to this post by Richard Gaskin via use-livecode
A widget is not an ordinary control.

It is the widget that has to generate messages for user's interaction.
So the widget's author decides whether you can grab it or not. See the
still actual discussion from 2015 here:

http://forums.livecode.com/viewtopic.php?p=126208#p126208

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
Hi Hermann,

> Am 27.06.2018 um 19:45 schrieb hh via use-livecode <[hidden email]>:
>
> A widget is not an ordinary control.
>
> It is the widget that has to generate messages for user's interaction.
> So the widget's author decides whether you can grab it or not. See the
> still actual discussion from 2015 here:
>
> http://forums.livecode.com/viewtopic.php?p=126208#p126208

Ok, scripted "mouseevents" in widgets or not, any opinion to the funky behaviour I experienced?


Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
In reply to this post by Richard Gaskin via use-livecode
Well, somewhere down the line the author of the SVG widget forget something:

That an imported SVG is supposed to behave exactly like any other
imported image.

Richmond.

On 27/6/2018 8:45 pm, hh via use-livecode wrote:

> A widget is not an ordinary control.
>
> It is the widget that has to generate messages for user's interaction.
> So the widget's author decides whether you can grab it or not. See the
> still actual discussion from 2015 here:
>
> http://forums.livecode.com/viewtopic.php?p=126208#p126208
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
In reply to this post by Richard Gaskin via use-livecode
> Klaus wrote:
> ... any opinion to the funky behaviour I experienced?

Sorry, I overlooked that you are using LC 9.
With LC 9 in edit mode the SVG widget is here moved with
the mouse even without any script.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
Hi Hermann,

> Am 27.06.2018 um 20:04 schrieb hh via use-livecode <[hidden email]>:
>
>> Klaus wrote:
>> ... any opinion to the funky behaviour I experienced?
>
> Sorry, I overlooked that you are using LC 9.
> With LC 9 in edit mode the SVG widget is here moved with
> the mouse even without any script.

That's not what I experienced...
Thius is what happens here:
1. Create a stack
2. Create a SVG widget
3. Add this script to the SVG:
on mouseDown
 grab me
end mouseDown
4. Switch to POINTER tool
5. Nothing happens, no GRAB on mousedown!
6. Switch back to EDIT tool and move the mouse to the stack with the SVG,
et voila paranoia 8-)

Means the Widget (selected or not!) sticks to the mouse in EDIT mode and
I cannot get rid of it unless I delete the widget or close the stack.

That cannot be desired behavior!?
Maybe will create a screen movie later...


Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
In reply to this post by Richard Gaskin via use-livecode
Indeed: but that is not what I, and subsequently, Klaus, found.

If an SVG widget contains this script:

on mouseDown
    grab me
end mouseDown

in Edit mode, whether the mouse is down or up the widget moves with
the mouse and cannot be released.

Richmond.

On 27/6/2018 9:04 pm, hh via use-livecode wrote:

>> Klaus wrote:
>> ... any opinion to the funky behaviour I experienced?
> Sorry, I overlooked that you are using LC 9.
> With LC 9 in edit mode the SVG widget is here moved with
> the mouse even without any script.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
Hi Richmond,

> Am 27.06.2018 um 20:24 schrieb Richmond Mathewson via use-livecode <[hidden email]>:
>
> Indeed: but that is not what I, and subsequently, Klaus, found.
>
> If an SVG widget contains this script:
> on mouseDown
>   grab me
> end mouseDown
> in Edit mode, whether the mouse is down or up the widget moves with
> the mouse and cannot be released.

EXACTLY!
Thanks for testing.

> Richmond.

Best

Klaus
--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
Am 27.06.2018 um 20:30 schrieb Klaus major-k via use-livecode <[hidden email]>:

> Hi Richmond,
>> Am 27.06.2018 um 20:24 schrieb Richmond Mathewson via use-livecode <[hidden email]>:
>> Indeed: but that is not what I, and subsequently, Klaus, found.
>> If an SVG widget contains this script:
>> on mouseDown
>>  grab me
>> end mouseDown
>> in Edit mode, whether the mouse is down or up the widget moves with
>> the mouse and cannot be released.
>
> EXACTLY!
> Thanks for testing.

In case someone is interested:
<https://quality.livecode.com/show_bug.cgi?id=21391>


Best

Klaus
--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
I haven't found a way to make it stop sticking either.  And I agree with
the QCC entry that basic mouse event type messages including the ability to
use "grab" or whatever should be glommed on to all widgets in some way.
 Admittedly, the grab issue can likely be worked around (mousedown itself
works, you can have mousedown PUT a random number from the widgets script,
its the grab in this case that doesn't work..) so one could use the old
mouse is down set a flag mousemove method to change its location, but in
many cases grab/dragdrop is preferable.

On Wed, Jun 27, 2018 at 12:55 PM Klaus major-k via use-livecode <
[hidden email]> wrote:

> Am 27.06.2018 um 20:30 schrieb Klaus major-k via use-livecode <
> [hidden email]>:
> > Hi Richmond,
> >> Am 27.06.2018 um 20:24 schrieb Richmond Mathewson via use-livecode <
> [hidden email]>:
> >> Indeed: but that is not what I, and subsequently, Klaus, found.
> >> If an SVG widget contains this script:
> >> on mouseDown
> >>  grab me
> >> end mouseDown
> >> in Edit mode, whether the mouse is down or up the widget moves with
> >> the mouse and cannot be released.
> >
> > EXACTLY!
> > Thanks for testing.
>
> In case someone is interested:
> <https://quality.livecode.com/show_bug.cgi?id=21391>
>
>
> Best
>
> Klaus
> --
> Klaus Major
> http://www.major-k.de
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
In reply to this post by Richard Gaskin via use-livecode
All that does is show me how much LC centre . . . .

Richmond.

On 27/6/2018 9:55 pm, Klaus major-k via use-livecode wrote:

> Am 27.06.2018 um 20:30 schrieb Klaus major-k via use-livecode <[hidden email]>:
>> Hi Richmond,
>>> Am 27.06.2018 um 20:24 schrieb Richmond Mathewson via use-livecode <[hidden email]>:
>>> Indeed: but that is not what I, and subsequently, Klaus, found.
>>> If an SVG widget contains this script:
>>> on mouseDown
>>>   grab me
>>> end mouseDown
>>> in Edit mode, whether the mouse is down or up the widget moves with
>>> the mouse and cannot be released.
>> EXACTLY!
>> Thanks for testing.
> In case someone is interested:
> <https://quality.livecode.com/show_bug.cgi?id=21391>
>
>
> Best
>
> Klaus
> --
> Klaus Major
> http://www.major-k.de
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
In reply to this post by Richard Gaskin via use-livecode
Choosing the browse tool stops it, in case you don't feel like
restarting LC.

On 6/27/18 2:02 PM, Mike Bonner via use-livecode wrote:
> I haven't found a way to make it stop sticking either.


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
Hi Jacqueline,

> Am 27.06.2018 um 21:20 schrieb J. Landman Gay via use-livecode <[hidden email]>:
>
> Choosing the browse tool stops it, in case you don't feel like restarting LC.

yep, but switching back to EDIT starts the same procedure again, fun for the whole family! :-)

> On 6/27/18 2:02 PM, Mike Bonner via use-livecode wrote:
>> I haven't found a way to make it stop sticking either.
>
> --
> Jacqueline Landman Gay

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
On 6/27/18 2:23 PM, Klaus major-k via use-livecode wrote:
>> Am 27.06.2018 um 21:20 schrieb J. Landman Gay via use-livecode<[hidden email]>:
>>
>> Choosing the browse tool stops it, in case you don't feel like restarting LC.
> yep, but switching back to EDIT starts the same procedure again, fun for the whole family! :-)
>

I think you should make it into a game and call it a feature.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode


> Am 27.06.2018 um 22:31 schrieb J. Landman Gay via use-livecode <[hidden email]>:
>
> On 6/27/18 2:23 PM, Klaus major-k via use-livecode wrote:
>>> Am 27.06.2018 um 21:20 schrieb J. Landman Gay via use-livecode<[hidden email]>:
>>>
>>> Choosing the browse tool stops it, in case you don't feel like restarting LC.
>> yep, but switching back to EDIT starts the same procedure again, fun for the whole family! :-)
>
> I think you should make it into a game and call it a feature.

If I'd make a game from it I'd rather call it "Sticky Wicky" or something! :-D


Best

Klaus
--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
In reply to this post by Richard Gaskin via use-livecode
I wonder what would happen if you passed mouseDown?

Bob S


> On Jun 27, 2018, at 11:24 , Richmond Mathewson via use-livecode <[hidden email]> wrote:
>
> Indeed: but that is not what I, and subsequently, Klaus, found.
>
> If an SVG widget contains this script:
>
> on mouseDown
>   grab me
> end mouseDown
>
> in Edit mode, whether the mouse is down or up the widget moves with
> the mouse and cannot be released.
>
> Richmond.
>
> On 27/6/2018 9:04 pm, hh via use-livecode wrote:
>>> Klaus wrote:
>>> ... any opinion to the funky behaviour I experienced?
>> Sorry, I overlooked that you are using LC 9.
>> With LC 9 in edit mode the SVG widget is here moved with
>> the mouse even without any script.
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Grabbing a widget

Richard Gaskin via use-livecode
In reply to this post by Richard Gaskin via use-livecode
It sounds more like "Fly Paper”!   You did grab onto it after all.

> On Jun 27, 2018, at 4:34 PM, Klaus major-k via use-livecode <[hidden email]> wrote:
>
>> I think you should make it into a game and call it a feature.
>
> If I'd make a game from it I'd rather call it "Sticky Wicky" or something! :-D
>
>
> Best
>
> Klaus
> --
> Klaus Major

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode