It would be easier to understand Array Type if the example did compile...
It seems that .Count(), .Insert() and .Replace are unrecognized.
- Code: Select all
' this is the global scope
Signal on_ProjectOpen()
Dim a As Array = Array(1, 2, "Hello", "World")
Dim s As Integer
MsgBox("Array Example")
' MsgBox(a.Count())
a.RemoveAll()
' MsgBox(a.Count())
a.Append("super")
MsgBox(a)
a.Remove(0)
' a.Insert("Sunday", 0)
MsgBox(a.Object(0))
' a.Replace("Monday", 0)
MsgBox(a)
Dim ab As Array = Array(Array("Hello", "World", False), Array(99.99, 66, True))
' WriteArray(ab, Desktop.DesktopLocation() & "/arraytest.xml")
' ab = ReadArray(Desktop.DesktopLocation() & "/arraytest.xml")
MsgBox(ab)
End Signal
Event Init()
Timer(1, on_ProjectOpen) ' workaround for delayed init for global ' TODO2
End Event
After commenting out the lines abowe, I get:
Start Q7Basic compiler...
Read source files...
Compile Global.QObject
Compile MainWindow.QMainWindow
Compile MainWindow.QMainWindow_disabled
Compile SystemTray.QSystemTrayIcon
:= expected in line 30 in file Global.QObject
...) ' workaround for delayed init for global ' TODO2
End Event
/Henning