This code causes a crash on OS4:
Code: Select all
@REQUIRE "RapaGUI"
EnableLayers()
AppGUI$=[[<application id="app">
<window id="Main" Title="Test">
<vgroup>
<hollywood id="MainDisplay" display="1" droptarget="true" notify="dropfile" fixwidth="true" fixheight="true"/>
</vgroup>
</window>
</application>]]
moai.CreateApp(AppGUI$)
;moai.Set("MainDisplay", "droptarget", False); This line can prevent the crash.
moai.Set("MainDisplay", "droptarget", True); This is the line that causes the problem when a file is dropped on the display.
Function p_MainGUIFunc()
DebugPrint("Dropped")
EndFunction
InstallEventHandler({RapaGUI=p_MainGUIFunc})
Repeat
WaitEvent
Forever