In this test, in windows, each time a write in the editor I have a notification from HasChanged so is ok but the same example in Amiga is only notified the first time.
I'm at home for 15 days so perhaps my brain is doing something funny.
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
<window id="win" title="TextEditor - Unnamed" width="600" height="400" notify="closerequest">
<vgroup>
<texteditor id="editor" notify="haschanged"/>
</vgroup>
</window>
</application>
Code: Select all
/*
** Make sure we have at least Hollywood 6.1!
*/
@VERSION 6,1
/*
** This script requires the RapaGUI plugin
*/
@REQUIRE "RapaGUI"
/*
** Information about this app
*/
@APPTITLE "Test HasChanged"
@APPVERSION "$VER: 0.1"
@APPCOPYRIGHT "(C) 2020 by tolkien/goblins"
@APPAUTHOR "tolkien/goblins"
@APPDESCRIPTION " "
/*
** Handles all incoming events
*/
Function p_EventFunc(msg)
Switch msg.action
Case "RapaGUI":
Switch msg.attribute
Case "CursorPos":
;DebugPrint("CursorPos")
Case "UndoAvailable":
Case "HasChanged":
DebugPrint(msg.attribute)
If msg.triggervalue
DebugPrint(msg.triggervalue)
EndIf
Case "CloseRequest":
End
EndSwitch
EndSwitch
EndFunction
; dynamically create GUI from an external *.xml file definition
moai.CreateApp(FileToString("TextEditor.xml"))
; listen to these events!
InstallEventHandler({RapaGUI = p_EventFunc})
projectname$ = "Unnamed"
; main loop!
Repeat
WaitEvent
Forever