PDA

View Full Version : W800 Problem



harleydude
November 1st, 2006, 12:44 PM
I was playing with adding Security Devices to the W800 config screen and they were not being added. I looked into the W800RF32_UI.lua file and made some changes. It appears to be working now and I started seeing the devices in the DM. Below are the changes I made in the OnEvent handler.


if ( ID1 == 9 ) then -- apply
local num = tonumber (Controls.devnedit.Text)
local loc = Controls.location.Text
local name = Controls.nameedit.Text
local dev = Controls.typeedit.ItemIndex

if dui.Forms[Index].currentdev ~= 0 and dui.Forms[Index].currentdev ~= num then -- user changed the dev num in edit mode
W800:DeleteSecurityDevice (num)
end

W800:AddSecurityDevice (num, {Name = name, Type = dev, Location = loc})
selectmode (Index, Action, Controls)
buildlist (Index,Action,Controls)
update (Index,Action,Controls,num)
end


Rick