Bug / No obvious solution

Report any Hollywood bugs here
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Bug / No obvious solution

Post by djrikki »

Hi,

I set up a OnMouseOver for a whole display that changes the mouse pointer back to a normal pointer and I have 'links' on the page that change it to a 'hand' pointer OnMouseOver.

Now if the link is near the top of the display, and I move the mouse pointer quickly to the title bar of the window it remains as a 'hand' pointer. I believe I am right in thinking that
it is impossible to attach a OnMouseOver to the title bar of the window. I have tried using OnMouseOut in the past as well, but again if the user quickly moves the mouse of the
actual title bar it can and does remain a 'hand' pointer. Is there a plausible solution out there to stop this behaviour?

Thanks.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Bug / No obvious solution

Post by airsoftsoftwair »

Can you post a very small code snippet that shows the problem?
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: Bug / No obvious solution

Post by djrikki »

Code: Select all

@DISPLAY {title = "Text Entry", Width = 400, Height = 250}

Const #AISSFOLDER = "tbimages:"
Const #LINKPOINTER = 118
Const #NORMALPOINTER = 119

p_LoadBrush(#LINKPOINTER, #AISSFOLDER .. "linkcursor", True)
p_LoadBrush(#NORMALPOINTER, #AISSFOLDER .. "normalcursor_s", True)
CreatePointer(#NORMALPOINTER, #BRUSH, #NORMALPOINTER, 1, 0, 0)
CreatePointer(#LINKPOINTER, #BRUSH, #LINKPOINTER, 1, 5, #TOP)

evtfunc = {OnMouseDown = p_mainToolbar, OnMouseOver = p_mainToolbar}

MakeButton(999, #SIMPLEBUTTON,0,0,GetAttribute(#DISPLAY,0,#ATTRWIDTH),GetAttribute(#DISPLAY,0,#ATTRHEIGHT), evtfunc)

MakeButton(1, #SIMPLEBUTTON, 50,50, 200,30, evtfunc) ; Empty button so you see the pointer changing

Function p_LoadBrush(constant, folder$, alpha)
	ExitOnError(False)
	If alpha = True
		LoadBrush(constant, folder$, {LoadAlpha = TRUE})
	Else
		LoadBrush(constant, folder$, {LoadAlpha = FALSE})
	EndIf
	
	If GetLastError() > 0
		If FindStr(folder$,#AISSFOLDER) > -1
			SystemRequest(locale[122],locale[347] .. "\n\n" .. locale[454] .. ":\n\n" .. folder$,locale[452],#REQICON_WARNING)
		Else
			SystemRequest(locale[122],locale[453] .. "\n\n" .. locale[454] .. ":\n\n" .. folder$,locale[452],#REQICON_WARNING)
		EndIf
		End()
	EndIf
	ExitOnError(True)
EndFunction

Function p_mainToolbar(msg)
	Switch msg.action
		Case "OnMouseOver"
			p_mouseLinkPointer(msg.id)

	EndSwitch
EndFunction

Function p_mouseLinkPointer(id)
	If id <> 999
		SetPointer(#LINKPOINTER)
	Else
		SetPointer(#NORMALPOINTER)
	EndIf
EndFunction
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: Bug / No obvious solution

Post by djrikki »

If you play around with my application Jack, open the file manager (F3). Roll mouse across the top toolbar and then flick mouse of the window's title bar, sometimes a bit tricky to get it stuck on the Link pointer, but it can be done.

Talking of windows or rather 'displays', question on CreateDisplay. I specify a display 1024x768, does that include the title bar and the surrounding edges? Well I assume not, because a problem was brought to my attention in Jack's App-Store. If the answer to the previous question is No, can you please update HW's documentation to make it more clearer? Thanks.

The App-Store I defined as 1024x768. If I change my screen resolution to exactly 1024x768 and try entering the App-Store at this resolution -Hollywood captures the attempt to CreateDisplay(.... width = 1024, height = 768 ... ) throws a error exception - I use GetLastError() to present a custom error message.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Bug / No obvious solution

Post by airsoftsoftwair »

The code is much too long, please try to break it down to an absolute minimum. In your code there are dozens of things that could cause problems, that's why I always need absolutely minimal source snippets.
I specify a display 1024x768, does that include the title bar and the surrounding edges?
No, the display size is always the inner size of the window. Borders are never taken into account. But you can find out the border dimensions using the #ATTRBORDERXXX attributes with GetAttribute().
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: Bug / No obvious solution

Post by djrikki »

Thanks on the CreateDisplay question. Bummer.

As for the Snippet above, I cannot really break it down anymore. Its self-contained, if you copy that little snippet into Codebench, compile, it should run as is.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
Post Reply