Index: trunk/desktop/mainWindow.rbfrm
===================================================================
--- trunk/desktop/mainWindow.rbfrm	(revision 16)
+++ trunk/desktop/mainWindow.rbfrm	(revision 17)
@@ -138,5 +138,5 @@
       Top             =   32
       Underline       =   ""
-      Value           =   0
+      Value           =   3
       Visible         =   True
       Width           =   637
@@ -3439,8 +3439,10 @@
 #tag Events EditField_Byte17
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3450,13 +3452,15 @@
 		  i = d
 		  ICSSerialPort1.Byte17 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte16
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3466,13 +3470,15 @@
 		  i = d
 		  ICSSerialPort1.Byte16 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte15
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3482,13 +3488,15 @@
 		  i = d
 		  ICSSerialPort1.Byte15 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte14
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3498,13 +3506,15 @@
 		  i = d
 		  ICSSerialPort1.Byte14 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte13
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3514,13 +3524,15 @@
 		  i = d
 		  ICSSerialPort1.Byte13 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte12
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3530,13 +3542,15 @@
 		  i = d
 		  ICSSerialPort1.Byte12 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte11
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3546,13 +3560,15 @@
 		  i = d
 		  ICSSerialPort1.Byte11 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte10
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3562,13 +3578,15 @@
 		  i = d
 		  ICSSerialPort1.Byte10 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte9
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3578,13 +3596,15 @@
 		  i = d
 		  ICSSerialPort1.Byte09 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte8
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3594,13 +3614,15 @@
 		  i = d
 		  ICSSerialPort1.Byte08 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte7
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3610,13 +3632,15 @@
 		  i = d
 		  ICSSerialPort1.Byte07 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte6
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3626,13 +3650,15 @@
 		  i = d
 		  ICSSerialPort1.Byte06 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte5
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3642,13 +3668,15 @@
 		  i = d
 		  ICSSerialPort1.Byte05 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
 #tag Events EditField_Byte4
 	#tag Event
-		Function KeyDown(Key As String) As Boolean
+		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
@@ -3658,5 +3686,5 @@
 		  i = d
 		  ICSSerialPort1.Byte04 = chrb(i)
-		End Function
+		End Sub
 	#tag EndEvent
 #tag EndEvents
@@ -3665,6 +3693,8 @@
 		Sub TextChange()
 		  //Make sure we have a valid value if not then set it to something
-		  if val(me.Text) > 255 or val(me.Text) < 0 then
-		    me.Text = "255"
+		  if me.Text <> "" then
+		    if val(me.Text) > 255 or val(me.Text) < 0 then
+		      me.Text = "255"
+		    end if
 		  end if
 		  
