CreateObject with nested FileTosTring inside fails while works if you load string first
fails with "Error in line 9 (test-rapa.hws): Cannot find MOAI object "115"!" the 115 number is relevand with file size notice tha tchange size of file this number changes too
files are confirmed to be in UTF8 format (also tested with ansi)
do i miss something ?
Windwos7
Code: Select all
@REQUIRE "RapaGUI"
CreateBrush(1,400,400)
moai.CreateApp(FileToString("data\\window.xml"))
test$ = FileToString("data\\prefswin.xml")
moai.CreateObject(test$) ; WORKS
;moai.CreateObject(FileToString("data\\prefswin.xml")) ; FAILS
InstallEventHandler({RapaGUI = p_GUIHandle})
moai.DoMethod("basiot", "addwindow", "newwindow")
moai.Set("newwindow", "open", True)
Repeat
WaitEvent
Forever
Code: Select all
<window id="newwindow" title="A new window">
<vgroup>
<button>Hello World!</button>
<button>Hello World!</button>
</vgroup>
</window>