I got the XML file made, but now it doesn't read or misses the table, nor does it add rows/values into the gridlist.
function setRadioChannel(button, state)
local channel = xmlNodeGetChildren(xmlRootTree)
if (source == bChanSet) then
for k, v in ipairs(channel) do
local channelFreq = guiGetText(eChanFreq)
local channelDesc = guiGetText(eChanDesc)
local row = guiGridListAddRow(gRadioGrid)
if channelFreq then
guiGridListSetItemText( gRadioGrid, row, colFreq, channelFreq, false, false)
guiGridListSetItemData( gRadioGrid, row, colFreq, channelFreq)
outputDebugString("channelFreq Read, value " .. tostring(channelFreq) "set to row " .. tostring(row))
end
if channelDesc then
guiGridListSetItemText( gRadioGrid, row, colDesc, channelDesc, false, false)
guiGridListSetItemData( gRadioGrid, row, colDesc, channelDesc)
outputDebugString("channelFreq Read, value " .. tostring(channelDesc) "set to row " .. tostring(row))
end
end
end
end
addEventHandler("onClientGUIClick", getRootElement(), setRadioChannel)