I'm now the proud owner of a LiveCode licence so now its time to get down to some programming. I'm initially working on a windows platform but want my final application to be crossplatform Win/Mac and maybe Linux so need to write everything in livecode.
My first experiences are (these are tainted by my background C and VB6).
1. Its difficult to get an overall view of your code you can't see all the source in one place, I need to select every control and then view the code in that control. Have I missed something or is this just how the livecode works?
2. Its a real shame that the .rev and .livecode files are not ascii files as it makes file comparison and version control harder. Looking inside the files they are "almost" text anyway.
My first task involves communicating via the serial port I understand that the serial port is opened as a file using the "open file" command. The only example I could find for using serial ports is from Sarah here http://www.troz.net/rev/stacks/SerialTest.rev Thanks Sarah for sharing it.
Some details first about my serial requirements. I will need to communicate to up to 4 serial ports running at 115200 baud. The protocol I'm using is ModBus RTU which is used extensively in the automation business. The key feature of Modbus RTU is that the end of message is signified by a message gap of greater that 3.5 characters at 115200 baud this is about 300us. More details on the Modbus protocol can be found here http://en.wikipedia.org/wiki/Modbus
I have a number of questions that I hope people can help me with
1. I've already proved using Sarah's stack that I can talk to com ports above com9

2. Is there anyway to reliably get a list of installed com ports on a computer using Livecode (This could be read from the registry in windows, but I would like a cross platform solution)
3. My device usually connects via a USB-Serial chip which we program with a unique name. It would be good to further restrict the list of available ports to those with the unique name. But this would require accessing USB device details.
4. My next issue might be a real show stopper. Am I correct in saying the the reception of characters through serial ports do not generate an event? It can't be that the only way to handle receiving characters is to poll the port?
5. I need to get a FAST throughput on the Serial port so am hoping that there is some form of events driven interface for the serial port. I presume this is how UDP comms works.
I fully understand that some of the above issues may be because of my lack of knowledge of Livecode, so any help would be greatly appreciated.
Cheers
Martin