I was attempting to follow the “Serial Device Tutorial” from Xojo Documentation to recognize an ADB serial device connected through a Keyspan USB adapter. I am making an assumption the ADB Keyspan to USB port connected device would be recognized the same way as an RS-232 Keyspan device would. Unfortunately, I am only getting errors and do not understand if it is a problem with the Xojo example programing or the Keyspan adapter.
ERRORS:
This item does not Exist: Count
This item does not exist: RemoveAllRows
Type “PopupMenu” has no member named “RemoveAllRows”
and more…
CODE used in timer under action:
Var As Integer = DevicesPopupMenu.RowCount
If SerialDevice.Count <> count Then
// The number of serial devices has changed so update the menu
DevicesPopupMenu.RemoveAllRows
For i As Integer = 0 To SerialDevice.LastIndex
DevicesPopupMenu.AddRow(SerialDevice.At(i).Name)
Next
If SerialDevice.Count < count Then // a device has been removed
DevicesPopupMenu.SelectedRowIndex = 0
Else // one has been added so select the new device
DevicesPopupMenu.SelectedRowIndex = DevicesPopupMenu.LastRowIndex
End If
End If