The msg.triggervalue is supposed to be a table according to the docs, so I should be able to pass it to my Function that expects one to populate a listview.
However, if I do that I get a crash when Hollywood tries to iterate through the table items, complaining that the table is not initialized!
If I enumerate through the items at the event level and populate my listview there, it works. If I try to pass the msg.triggervalue as a parameter, it fails.
Code samples:
Given this Function:
Code: Select all
/*
** Adds a list of files in the Playlist listview
*/
Function p_InsertFilesInList(files)
If files[0] = "" Then Return
Local c = 0
While files[c] <> ""
moai.DoMethod("lv", "insert", "bottom", 9, files[c])
c = c + 1
Wend
moai.Set("lv", "active", "Top")
EndFunction
Code: Select all
Case "DropFile":
For Local k = 0 To ListItems(msg.triggervalue)-1 Do moai.DoMethod("lv", "insert", "bottom", 9, msg.triggervalue[k])
Code: Select all
Case "DropFile":
p_InsertFilesInList(msg.triggervalue)
Code: Select all
Case "DropFile":
Local temp = CopyTable(msg.triggervalue)
p_InsertFilesInList(temp)