[08 May 2007] event library issue

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
User avatar
lazi
Posts: 646
Joined: Thu Feb 24, 2011 11:08 pm

[08 May 2007] event library issue

Post by lazi »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 08 May 2007 18:09:55 +0100

Hi!

I found something that I think is a bug. Please follow this tour:

- Run the makebutton example from the Hollywood user guide (Copy and paste from the bottom of this mail.)

- Click on the red button. It said: "User left-clicked button 1"

- Click on the blue button. It said: "User left-clicked button 2"

- Press and hold the left button on the red area and move the pointer out of it. Release the left button.

- Do it with the blue area

The last two action correctly did not received any "left-click".

- Press and hold the left mouse button on the red area and release it at the blue area.

Correctly there is no "left-click" message.

Now here comes the tricky part:

- Press and hold the left mouse button on the blue area and release it at the red area.

Here it is! It said that the "User left-clicked button 1", which is faulty I think.

Here is the script:

Code: Select all

@display { Mode = "windowed", Desktop=false, Borderless = False, Sizeable = False, Title = "Test", X = #CENTER, Y = #CENTER, Width = 640, Height = 512 }

Function p_MyFunc(msg)

        Switch msg.action
                Case "OnMouseUp":
                        DebugPrint("User left-clicked button", msg.id)
                Case "OnMouseOver":
                        DebugPrint("User moved mouse over button", msg.id)
                Case "OnRightMouseUp":
                        DebugPrint("User right-clicked button", msg.id)
                EndSwitch

        EndFunction

        ; draw the buttons
        Box(0, 0, 100, 100, #RED)
        Box(200, 200, 100, 100, #BLUE)

        ; install them
        evtmatch = {OnMouseUp = p_MyFunc, OnMouseOver = p_MyFunc, OnRightMouseUp = p_MyFunc}
        MakeButton(1, #SIMPLEBUTTON, 0, 0, 100, 100, evtmatch)
        MakeButton(2, #SIMPLEBUTTON, 200, 200, 100, 100, evtmatch)

        Repeat
                WaitEvent
        Forever

EndFunction
GMKai
Posts: 158
Joined: Mon Feb 15, 2010 10:58 am

[09 May 2007] Re: event library issue

Post by GMKai »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 09 May 2007 10:59:56 +0200

not a bug, it's a feature. at least documented behaviour.
User avatar
lazi
Posts: 646
Joined: Thu Feb 24, 2011 11:08 pm

[09 May 2007] Re: event library issue

Post by lazi »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 09 May 2007 12:37:24 +0100

Hello Kai

Where is that behaviour documented? The doc said this:

OnMouseUp: The function specified here will be called when the user releases the left mouse button while the pointer is over the button's area. This event will only be triggered if the user also pressed the left mouse button while the pointer was over the button's area.

"will only be triggered if the user also pressed the left mouse button while the pointer was over the button's area"

It triggers the OnMouseUp even when you pressed down on another button's area.
GMKai
Posts: 158
Joined: Mon Feb 15, 2010 10:58 am

[10 May 2007] Re: Re: event library issue

Post by GMKai »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 10 May 2007 13:51:27 +0200

sorry, I misunderstood your explanation...
User avatar
airsoftsoftwair
Posts: 5833
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[11 May 2007] Re: event library issue

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 11 May 2007 11:45:38 +0200
Hi!

I found something that I think is a bug. Please follow this tour:

- Run the makebutton example from the Hollywood user guide (Copy and paste from the bottom of this mail.)

- Click on the red button. It said: "User left-clicked button 1"

- Click on the blue button. It said: "User left-clicked button 2"

- Press and hold the left button on the red area and move the pointer out of it. Release the left button.

- Do it with the blue area

The last two action correctly did not received any "left-click".

- Press and hold the left mouse button on the red area and release it at the blue area.

Correctly there is no "left-click" message.

Now here comes the tricky part:

- Press and hold the left mouse button on the blue area and release it at the red area.

Here it is! It said that the "User left-clicked button 1", which is faulty I think.
Yeah, right. Sucks :( I'll fix that in the next version. Thanks for report.
User avatar
lazi
Posts: 646
Joined: Thu Feb 24, 2011 11:08 pm

[17 May 2007] Re: event library issue

Post by lazi »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 17 May 2007 12:48:00 +0100

Hello Andreas!

Thanks in advance.
Locked