Page 1 of 1

MouseLeft/MouseMove/MouseRight notifications not working in compiled EXE on Windows

Posted: Tue May 26, 2026 12:57 am
by Adam Mierzwa
Hi,

I'm developing a graphics application using Hollywood and RapaGUI on Windows 11. I have a Scrollcanvas widget and I need to handle mouse events for a selection/rubber-band feature.

In the Hollywood IDE (F5), everything works fine. In the compiled EXE, I get the following error at startup:

`Unknown notification "MouseLeft"! File: events.hws (current line: 606 - In function: Notify)`

My code after `moai.CreateApp()`:

Code: Select all

moai.Notify("canvas", "MouseLeft", True)
moai.Notify("canvas", "MouseMove", True)
moai.Notify("canvas", "MouseRight", True)
I also tried setting notifications in XML:

Code: Select all

xml
<scrollcanvas id="canvas" notify="paint; mouseleft; mousemove; mouseright"/>
Same error in compiled EXE.

I also tried `InstallEventHandler` with `OnMouseDown`/`OnMouseUp`/`OnMouseMove` — these are never called when RapaGUI is active. `MouseX()`/`MouseY()` return 0.

Questions:
1. Is there a known issue with `MouseLeft`/`MouseMove`/`MouseRight` on Scrollcanvas in compiled EXE on Windows?
2. Is there any working way to handle mouse drag/selection on a Scrollcanvas in a compiled Hollywood application on Windows?

Thank you.

Re: MouseLeft/MouseMove/MouseRight notifications not working in compiled EXE on Windows

Posted: Tue May 26, 2026 7:08 am
by plouf
no, should be the same
(btw one is enough , either moai notify, or in XML)

a guess is that you compile winx64 while you are running 32bit hollywood and your plugins in linked x64 folder is older/fault

try this

Code: Select all

@REQUIRE "RapaGUI", {link=True}

moai.CreateApp([[
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app" >
	<window width="300" height="300">
		<vgroup>
			 <vspace height="5"/>
	<scrollcanvas id="canvas" VirtWidth="200" VirtHeight="200" notify="paint; mouseleft; mousemove; mouseright"/>		
	<text align="center">C </text> <textentry id="c_text" Notify="Acknowledge"></textentry>
		</vgroup>
	</window>
	 
</application>
]])

Function p_EventFunc(msg)
	DebugPrint( msg.attribute)
	moai.Set("c_text","Text",msg.attribute)
EndFunction

InstallEventHandler({RapaGUI = p_EventFunc})
moai.Notify("canvas", "MouseLeft", True)
moai.Notify("canvas", "MouseMove", True)
moai.Notify("canvas", "MouseRight", True)
Repeat
	WaitEvent
Forever
it is this exe https://limewire.com/d/qIQHg#VQMGBfzd81

win11 , hollywood 11

Re: MouseLeft/MouseMove/MouseRight notifications not working in compiled EXE on Windows

Posted: Tue May 26, 2026 1:27 pm
by Adam Mierzwa
Thank you for your help and the test EXE.

The MOAI.Notify calls still crash in my compiled EXE with "Unknown notification". Your test EXE works fine. The only difference I can see is that in your example MOAI.Notify is called in the main script scope, not inside a function. Could that make a difference? Or is there anything else I might be missing?

I ended up replacing Scrollcanvas with a Hollywood class widget and handling mouse input via SetInterval polling - works correctly in both IDE and compiled EXE.

Re: MouseLeft/MouseMove/MouseRight notifications not working in compiled EXE on Windows

Posted: Tue May 26, 2026 1:31 pm
by plouf
I dont think hav sdiffirence inside s functin or not
Just modify my example to test

Anyway i will carefoully replace all plugins (especially rapagui) in you system
Note that if you used old hollywood before 11 plugins where in holly folder but now in user profile
Need to replace corect and latest versions there

Since my test program exe works but not your
Its obvious a fault in your installation :-)

Re: MouseLeft/MouseMove/MouseRight notifications not working in compiled EXE on Windows

Posted: Tue May 26, 2026 3:41 pm
by Adam Mierzwa
Yes, the famous "works for me" ;) But that was it. You were right about checking the user profile. I had Hollywood 9 installed previously, so the old plugins were still there. I overwrote them and went back to the previous code. It works fine. Thank you for the help.